Added support for Windows color output using colorama (if installed)

This commit is contained in:
rneu31 2014-07-03 20:23:00 +00:00
parent 4883e1eba2
commit 0058b4d4bb

View File

@ -55,7 +55,12 @@ def color_terminal():
def nocolor():
codes.clear()
# check if colorama is installed to support color on Windows
try:
import colorama
colorama.init()
except ImportError:
codes.clear()
def coloron():
codes.update(_orig_codes)