From: Tim 'mithro' Ansell Date: Thu, 18 Jan 2018 03:41:45 +0000 (+1100) Subject: Support forcing colorama colors on. X-Git-Tag: 24jan2021_ls180~1757^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ead88ed66d15cbf92c165092dff86fbef071ff9b;p=litex.git Support forcing colorama colors on. This is needed if you want colors but are using pipes and similar. --- diff --git a/litex/build/xilinx/common.py b/litex/build/xilinx/common.py index 170e67e2..4c59a998 100644 --- 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