Exemple #1
0
def fail(string, terminate=True):
    """Wraps a string in the terminal colors for fail.

    Usage:
        fail('some text')  # colored text in terminal

    Args:
        string string: The string to wrap
        boolean terminate: Whether or not to terminate the color
    """
    return format_style(string, FAIL, TERMINATE if terminate else '')
Exemple #2
0
def ok_blue(string, terminate=True):
    """Wraps a string in the terminal colors for ok blue.

    Usage:
        ok_blue('some text')  # colored text in terminal

    Args:
        string string: The string to wrap
        boolean terminate: Whether or not to terminate the color
    """
    return format_style(string, OK_BLUE, TERMINATE if terminate else '')
Exemple #3
0
def warning(string, terminate=True):
    """Wraps a string in the terminal colors for warning.

    Usage:
        warning('some text')  # colored text in terminal

    Args:
        string string: The string to wrap
        boolean terminate: Whether or not to terminate the color
    """
    return format_style(string, WARNING, TERMINATE if terminate else '')
Exemple #4
0
def fail(string, terminate=True):
    """Wraps a string in the terminal colors for fail.

    Usage:
        fail('some text')  # colored text in terminal

    Args:
        string string: The string to wrap
        boolean terminate: Whether or not to terminate the color
    """
    return format_style(string, FAIL, TERMINATE if terminate else '')
Exemple #5
0
def header(string, terminate=True):
    """Wraps a string in the terminal colors for headers.

    Usage:
        header('some text')  # colored text in terminal

    Args:
        string string: The string to wrap
        boolean terminate: Whether or not to terminate the color
    """
    return format_style(string, HEADER, TERMINATE if terminate else '')
Exemple #6
0
def warning(string, terminate=True):
    """Wraps a string in the terminal colors for warning.

    Usage:
        warning('some text')  # colored text in terminal

    Args:
        string string: The string to wrap
        boolean terminate: Whether or not to terminate the color
    """
    return format_style(string, WARNING, TERMINATE if terminate else '')
Exemple #7
0
def ok_blue(string, terminate=True):
    """Wraps a string in the terminal colors for ok blue.

    Usage:
        ok_blue('some text')  # colored text in terminal

    Args:
        string string: The string to wrap
        boolean terminate: Whether or not to terminate the color
    """
    return format_style(string, OK_BLUE, TERMINATE if terminate else '')
Exemple #8
0
def header(string, terminate=True):
    """Wraps a string in the terminal colors for headers.

    Usage:
        header('some text')  # colored text in terminal

    Args:
        string string: The string to wrap
        boolean terminate: Whether or not to terminate the color
    """
    return format_style(string, HEADER, TERMINATE if terminate else '')
Exemple #9
0
def fail(string, terminate=True):
    """Wraps a string in the terminal colors for fail.

    Example:

    .. code-block:: python

        fail('some text')  # colored text in terminal

    Args:
        string (string): The string to wrap
        terminate (boolean): Whether or not to terminate the color
    """
    return format_style(string, FAIL, TERMINATE if terminate else '')
Exemple #10
0
def ok_green(string, terminate=True):
    """Wraps a string in the terminal colors for ok green.

    Example:

    .. code-block:: python

        ok_green('some text')  # colored text in terminal

    Args:
        string (string): The string to wrap
        terminate (boolean): Whether or not to terminate the color
    """
    return format_style(string, OK_GREEN, TERMINATE if terminate else '')