diff options
author | Joffrey F <joffrey@docker.com> | 2016-10-24 16:27:47 -0700 |
---|---|---|
committer | Joffrey F <joffrey@docker.com> | 2016-12-19 20:40:47 -0800 |
commit | 346802715dd3869c2a33c5d361ec8a56fa3352c5 (patch) | |
tree | 6ccf5cdce7ac9ccfa0e581398503907b472ea544 | |
parent | e6b2949edc4979e646c0fe0a93f77320d3c3a2f3 (diff) |
Use colorama to enable colored output on Windows
Signed-off-by: Joffrey F <joffrey@docker.com>
-rw-r--r-- | compose/cli/colors.py | 4 | ||||
-rw-r--r-- | requirements.txt | 1 | ||||
-rw-r--r-- | setup.py | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/compose/cli/colors.py b/compose/cli/colors.py index 3c18886f..6677a376 100644 --- a/compose/cli/colors.py +++ b/compose/cli/colors.py @@ -1,5 +1,8 @@ from __future__ import absolute_import from __future__ import unicode_literals + +import colorama + NAMES = [ 'grey', 'red', @@ -30,6 +33,7 @@ def make_color_fn(code): return lambda s: ansi_color(code, s) +colorama.init() for (name, code) in get_pairs(): globals()[name] = make_color_fn(code) diff --git a/requirements.txt b/requirements.txt index 8f6fe169..bae5d9ea 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,7 @@ PyYAML==3.11 backports.ssl-match-hostname==3.5.0.1; python_version < '3' cached-property==1.2.0 +colorama==0.3.7 docker==2.0.0 dockerpty==0.4.1 docopt==0.6.1 @@ -29,6 +29,7 @@ def find_version(*file_paths): install_requires = [ 'cached-property >= 1.2.0, < 2', + 'colorama >= 0.3.7, < 0.4', 'docopt >= 0.6.1, < 0.7', 'PyYAML >= 3.10, < 4', 'requests >= 2.6.1, != 2.11.0, < 2.12', |