Merge pull request #53 from mithro/allow-forcing-colorama
Support forcing colorama colors on.
This commit is contained in:
commit
d6f2f63794
|
@ -2,7 +2,11 @@ import os
|
||||||
import sys
|
import sys
|
||||||
try:
|
try:
|
||||||
import colorama
|
import colorama
|
||||||
colorama.init() # install escape sequence translation on Windows
|
# install escape sequence translation on Windows
|
||||||
|
if os.getenv("COLORAMA", "") == "force":
|
||||||
|
colorama.init(strip=False)
|
||||||
|
else:
|
||||||
|
colorama.init()
|
||||||
_have_colorama = True
|
_have_colorama = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
_have_colorama = False
|
_have_colorama = False
|
||||||
|
|
Loading…
Reference in New Issue