Merge pull request #53 from mithro/allow-forcing-colorama

Support forcing colorama colors on.
This commit is contained in:
Tim Ansell 2018-01-18 16:33:02 +11:00 committed by GitHub
commit d6f2f63794
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -2,7 +2,11 @@ import os
import sys
try:
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
except ImportError:
_have_colorama = False