mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
Support forcing colorama colors on.
This is needed if you want colors but are using pipes and similar.
This commit is contained in:
parent
fcc22350fb
commit
ead88ed66d
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue