From 0058b4d4bb0450e53f5daa9423942a40b3f70f1e Mon Sep 17 00:00:00 2001 From: rneu31 Date: Thu, 3 Jul 2014 20:23:00 +0000 Subject: [PATCH] Added support for Windows color output using colorama (if installed) --- sphinx/util/console.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sphinx/util/console.py b/sphinx/util/console.py index c2330102def..508d895fcff 100644 --- a/sphinx/util/console.py +++ b/sphinx/util/console.py @@ -55,7 +55,12 @@ def color_terminal(): def nocolor(): - codes.clear() + # check if colorama is installed to support color on Windows + try: + import colorama + colorama.init() + except ImportError: + codes.clear() def coloron(): codes.update(_orig_codes)