示例#1
0
def disable_if_no_tty():
    """Disable all colors if there is no TTY available.

    :return: True if colors are disabled, False if stderr or stdout is a TTY.
    :rtype: bool
    """
    return ANSICodeMapping.disable_if_no_tty()