2018-02-03 20:40:17 +00:00
|
|
|
#!/usr/bin/env python3
|
2018-02-03 00:36:08 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
2018-02-03 20:40:17 +00:00
|
|
|
# pylint: disable=C0111,C0326,C0103
|
|
|
|
|
2018-02-03 21:25:26 +00:00
|
|
|
"""Listing of ANSI colors plus additional Windows support."""
|
|
|
|
|
2018-02-03 01:15:29 +00:00
|
|
|
import platform
|
|
|
|
|
|
|
|
# Needed to make ANSI escape sequences work in Windows
|
2018-02-03 20:24:36 +00:00
|
|
|
SYSTEM = platform.system()
|
|
|
|
if SYSTEM == "Windows":
|
2018-02-03 01:15:29 +00:00
|
|
|
try:
|
|
|
|
import colorama
|
|
|
|
colorama.init()
|
|
|
|
except ImportError:
|
|
|
|
pass
|
|
|
|
|
2018-02-03 00:36:08 +00:00
|
|
|
UP_DEL = u"\u001b[F\u001b[K"
|
|
|
|
BLACK = u"\u001b[0;30m"
|
|
|
|
RED_DARK = u"\u001b[0;31m"
|
|
|
|
GREEN_DARK = u"\u001b[0;32m"
|
|
|
|
YELLOW_DARK = u"\u001b[0;33m"
|
|
|
|
CYAN_DARK = u"\u001b[0;36m"
|
|
|
|
SILVER = u"\u001b[0;37m"
|
|
|
|
GREY = u"\u001b[1;30m"
|
|
|
|
RED = u"\u001b[1;31m"
|
|
|
|
GREEN = u"\u001b[1;32m"
|
|
|
|
YELLOW = u"\u001b[1;33m"
|
|
|
|
CYAN = u"\u001b[1;36m"
|
|
|
|
WHITE = u"\u001b[1;37m"
|
|
|
|
RESET = u"\u001b[0m"
|