Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use the default terminal colour to print out INFO messages in distutils.

This prevents visibility problems on backgrounds other than black.
  • Loading branch information...
commit 6e78d7dde1bc3f6247afde492bae4ae830e95d65 1 parent 49a26ff
@stefanv stefanv authored
Showing with 5 additions and 3 deletions.
  1. +2 −2 numpy/distutils/log.py
  2. +3 −1 numpy/distutils/misc_util.py
View
4 numpy/distutils/log.py
@@ -4,7 +4,7 @@
from distutils.log import *
from distutils.log import Log as old_Log
from distutils.log import _global_log
-from misc_util import red_text, yellow_text, cyan_text, green_text, is_sequence, is_string
+from misc_util import red_text, default_text, cyan_text, green_text, is_sequence, is_string
def _fix_args(args,flag=1):
@@ -67,7 +67,7 @@ def set_verbosity(v, force=False):
_global_color_map = {
DEBUG:cyan_text,
- INFO:yellow_text,
+ INFO:default_text,
WARN:red_text,
ERROR:red_text,
FATAL:red_text
View
4 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 @@ def colour_text(s, fg=None, bg=None, bold=False):
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):
Please sign in to comment.
Something went wrong with that request. Please try again.