diff options
author | Stefan van der Walt <stefan@sun.ac.za> | 2008-04-16 21:03:41 +0000 |
---|---|---|
committer | Stefan van der Walt <stefan@sun.ac.za> | 2008-04-16 21:03:41 +0000 |
commit | 6e78d7dde1bc3f6247afde492bae4ae830e95d65 (patch) | |
tree | f8ceeab2db6118cf09a680db6b7173aeff0561af /numpy/distutils/misc_util.py | |
parent | 49a26ff5e3bec2d20699eb46a1f8fdb819db998e (diff) | |
download | numpy-6e78d7dde1bc3f6247afde492bae4ae830e95d65.tar.gz |
Use the default terminal colour to print out INFO messages in distutils.
This prevents visibility problems on backgrounds other than black.
Diffstat (limited to 'numpy/distutils/misc_util.py')
-rw-r--r-- | numpy/distutils/misc_util.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/distutils/misc_util.py b/numpy/distutils/misc_util.py index acc2f5ebf..30a5014aa 100644 --- a/numpy/distutils/misc_util.py +++ b/numpy/distutils/misc_util.py @@ -258,7 +258,7 @@ def terminal_has_colors(): if terminal_has_colors(): _colour_codes = dict(black=0, red=1, green=2, yellow=3, - blue=4, magenta=5, cyan=6, white=7) + blue=4, magenta=5, cyan=6, white=7, default=9) def colour_text(s, fg=None, bg=None, bold=False): seq = [] if bold: @@ -277,6 +277,8 @@ else: def colour_text(s, fg=None, bg=None): return s +def default_text(s): + return colour_text(s, 'default') def red_text(s): return colour_text(s, 'red') def green_text(s): |