Commits

Marc Abramowitz committed dadaebc

Add an environment variable `PY_FORCE_COLOR` to force color output

  • Participants
  • Parent commits e56a475
  • Branches py_force_color

Comments (0)

Files changed (1)

File py/_io/terminalwriter.py

         file.flush()
 
 def should_do_markup(file):
+    if os.environ.get('PY_FORCE_COLOR'):
+        return True
     return hasattr(file, 'isatty') and file.isatty() \
            and os.environ.get('TERM') != 'dumb' \
            and not (sys.platform.startswith('java') and os._name == 'nt')