changeset 375:9d0a3ab7f573

set colors off for Windows
author devlinjs@A0266D4FVTK81.wrightpatterson.afmc.ds.af.mil
date Thu, 13 Aug 2009 13:20:30 -0400
parents 05758f4bcac1
children a70adadca4d8 9fc0da48b2c4 0f019dfb795f
files sqlpython/sqlpython.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/sqlpython/sqlpython.py	Tue Aug 11 14:53:29 2009 -0400
+++ b/sqlpython/sqlpython.py	Thu Aug 13 13:20:30 2009 -0400
@@ -8,7 +8,7 @@
 # Best used with the companion modules sqlpyPlus and mysqlpy 
 # See also http://twiki.cern.ch/twiki/bin/view/PSSGroup/SqlPython
 
-import cmd2,getpass,binascii,cx_Oracle,re,os
+import cmd2,getpass,binascii,cx_Oracle,re,os,platform
 import sqlalchemy, pyparsing
 __version__ = '1.6.7'    
 
@@ -315,7 +315,7 @@
                   'red':{True:'\x1b[36m',False:'\x1b[39m'},
                   'cyan':{True:'\x1b[31m',False:'\x1b[39m'},
                   'underline':{True:'\x1b[4m',False:'\x1b[24m'}}
-    colors = True
+    colors = (platform.system() != 'Windows')
     def colorize(self, val, color):
         if self.colors and (self.stdout == self.initial_stdout):
             if color not in self.colorcodes: