def supports_color():
 plat = sys.platform
 supported_platform = ((plat != 'Pocket PC') and ((plat != 'win32') or ('ANSICON' in os.environ)))
 is_a_tty = (hasattr(sys.stdout, 'isatty') and sys.stdout.isatty())
 if ((not supported_platform) or (not is_a_tty)):
  return False
 return True

def supports_color ( ) : plat = sys . platform supported_platform = ( ( plat != 'Pocket PC' ) and ( ( plat != 'win32' ) or ( 'ANSICON' in os . environ ) ) ) is_a_tty = ( hasattr ( sys . stdout , 'isatty' ) and sys . stdout . isatty ( ) ) if ( ( not supported_platform ) or ( not is_a_tty ) ) : return False return True
returns true if the running systems terminal supports color .