[Numpy-svn] r5039 - trunk/numpy/distutils

numpy-svn@scip... numpy-svn@scip...
Wed Apr 16 16:04:24 CDT 2008


Author: stefan
Date: 2008-04-16 16:03:41 -0500 (Wed, 16 Apr 2008)
New Revision: 5039

Modified:
   trunk/numpy/distutils/log.py
   trunk/numpy/distutils/misc_util.py
Log:
Use the default terminal colour to print out INFO messages in distutils. 
This prevents visibility problems on backgrounds other than black.


Modified: trunk/numpy/distutils/log.py
===================================================================
--- trunk/numpy/distutils/log.py	2008-04-16 15:21:22 UTC (rev 5038)
+++ trunk/numpy/distutils/log.py	2008-04-16 21:03:41 UTC (rev 5039)
@@ -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 @@
 
 _global_color_map = {
     DEBUG:cyan_text,
-    INFO:yellow_text,
+    INFO:default_text,
     WARN:red_text,
     ERROR:red_text,
     FATAL:red_text

Modified: trunk/numpy/distutils/misc_util.py
===================================================================
--- trunk/numpy/distutils/misc_util.py	2008-04-16 15:21:22 UTC (rev 5038)
+++ trunk/numpy/distutils/misc_util.py	2008-04-16 21:03:41 UTC (rev 5039)
@@ -258,7 +258,7 @@
 
 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):
         return s
 
+def default_text(s):
+    return colour_text(s, 'default')
 def red_text(s):
     return colour_text(s, 'red')
 def green_text(s):



More information about the Numpy-svn mailing list