projects
/
litex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fcc2235
)
Support forcing colorama colors on.
author
Tim 'mithro' Ansell
<me@mith.ro>
Thu, 18 Jan 2018 03:41:45 +0000
(14:41 +1100)
committer
Tim 'mithro' Ansell
<me@mith.ro>
Thu, 18 Jan 2018 03:41:45 +0000
(14:41 +1100)
This is needed if you want colors but are using pipes and similar.
litex/build/xilinx/common.py
patch
|
blob
|
history
diff --git
a/litex/build/xilinx/common.py
b/litex/build/xilinx/common.py
index 170e67e258827c167364bb03703aeb9bd08958e7..4c59a9983dfb4548f3312345b4feb70483632f1a 100644
(file)
--- a/
litex/build/xilinx/common.py
+++ b/
litex/build/xilinx/common.py
@@
-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