1
0

Moved Colorama boilerplate to ansi.py.

This commit is contained in:
2018-02-03 02:15:29 +01:00
parent 34ba8a0db0
commit 9920c13582
8 changed files with 11 additions and 24 deletions
+11
View File
@@ -1,5 +1,16 @@
# -*- coding: utf-8 -*-
import platform
# Needed to make ANSI escape sequences work in Windows
system = platform.system()
if system == "Windows":
try:
import colorama
colorama.init()
except ImportError:
pass
UP_DEL = u"\u001b[F\u001b[K"
BLACK = u"\u001b[0;30m"
RED_DARK = u"\u001b[0;31m"