|
|
@ -27,9 +27,17 @@ import logging |
|
|
|
|
|
|
|
|
|
|
|
# Formatting. Default colors to empty strings. |
|
|
|
# Formatting. Default colors to empty strings. |
|
|
|
BOLD, BLUE, RED, GREY = ("", ""), ("", ""), ("", ""), ("", "") |
|
|
|
BOLD, BLUE, RED, GREY = ("", ""), ("", ""), ("", ""), ("", "") |
|
|
|
|
|
|
|
try: |
|
|
|
|
|
|
|
# Make sure python thinks it can write unicode to its stdout |
|
|
|
|
|
|
|
"\u2713".encode("utf_8").decode(sys.stdout.encoding) |
|
|
|
TICK = "✓ " |
|
|
|
TICK = "✓ " |
|
|
|
CROSS = "✖ " |
|
|
|
CROSS = "✖ " |
|
|
|
CIRCLE = "○ " |
|
|
|
CIRCLE = "○ " |
|
|
|
|
|
|
|
except UnicodeDecodeError: |
|
|
|
|
|
|
|
TICK = "P " |
|
|
|
|
|
|
|
CROSS = "x " |
|
|
|
|
|
|
|
CIRCLE = "o " |
|
|
|
|
|
|
|
|
|
|
|
if os.name == 'posix': |
|
|
|
if os.name == 'posix': |
|
|
|
# primitive formatting on supported |
|
|
|
# primitive formatting on supported |
|
|
|
# terminal via ANSI escape sequences: |
|
|
|
# terminal via ANSI escape sequences: |
|
|
|