# HG changeset patch # User catherine@Drou # Date 1265634008 18000 # Node ID cd015f2bff44b7710218fa1097aacf8931fc57d8 # Parent 5497ae28bc70f29e2abbb484ae37c38b056ce878 synch with work diff -r 5497ae28bc70 -r cd015f2bff44 setup.py --- a/setup.py Mon Feb 01 16:48:00 2010 -0500 +++ b/setup.py Mon Feb 08 08:00:08 2010 -0500 @@ -9,7 +9,7 @@ Operating System :: OS Independent""".splitlines() setup(name="sqlpython", - version="1.6.8", + version="1.7.0", description="Command-line interface to Oracle", long_description="Customizable alternative to Oracle's SQL*PLUS command-line interface", author="Luca Canali", @@ -17,7 +17,7 @@ url="http://packages.python.org/sqlpython", packages=find_packages(), include_package_data=True, - install_requires=['pyparsing','cmd2>=0.5.6','gerald>=0.3.1', + install_requires=['pyparsing','cmd2>=0.6.0','gerald>=0.3.5', 'genshi>=0.5','sqlalchemy>=0.5.5'], extras_require = { 'oracle': ['cx_Oracle>=5.0.2'], diff -r 5497ae28bc70 -r cd015f2bff44 sqlpython/mysqlpy.py --- a/sqlpython/mysqlpy.py Mon Feb 01 16:48:00 2010 -0500 +++ b/sqlpython/mysqlpy.py Mon Feb 08 08:00:08 2010 -0500 @@ -13,9 +13,9 @@ class mysqlpy(sqlpyPlus): ''' -MySqlPy V1.6.8 - 'sqlplus in python' +MySqlPy V1.7.0 - 'sqlplus in python' Author: Luca.Canali@cern.ch -Rev: 1.6.8, 02-Sep-09 +Rev: 1.7.0, 06-Feb-10 Companion of SqlPython, a python module that reproduces Oracle's command line within python and sqlpyPlus. Major contributions by Catherine Devlin, http://catherinedevlin.blogspot.com diff -r 5497ae28bc70 -r cd015f2bff44 sqlpython/sqlpython.py --- a/sqlpython/sqlpython.py Mon Feb 01 16:48:00 2010 -0500 +++ b/sqlpython/sqlpython.py Mon Feb 08 08:00:08 2010 -0500 @@ -10,7 +10,7 @@ import cmd2,getpass,binascii,re,os,platform import sqlalchemy, pyparsing, schemagroup, connections -__version__ = '1.6.8' +__version__ = '1.7.0' try: import cx_Oracle except ImportError: @@ -293,20 +293,13 @@ return cmd2.Cmd.do_quit(self, None) do_exit = do_quit do_q = do_quit - colorcodes = {'bold':{True:'\x1b[1m',False:'\x1b[22m'}, - 'red':{True:'\x1b[36m',False:'\x1b[39m'}, - 'cyan':{True:'\x1b[31m',False:'\x1b[39m'}, - 'underline':{True:'\x1b[4m',False:'\x1b[24m'}} - colors = (platform.system() != 'Windows') def colorize(self, val, color): - if self.colors and (self.stdout == self.initial_stdout): - if color not in self.colorcodes: - if (color % 2): - color = 'red' - else: - color = 'cyan' - return self.colorcodes[color][True] + val + self.colorcodes[color][False] - return val + if color not in self.colorcodes: + if (color % 2): + color = 'red' + else: + color = 'cyan' + return cmd2.Cmd.colorize(self, val, color) def pmatrix(self,rows,maxlen=30,heading=True,restructuredtext=False): '''prints a matrix, used by sqlpython to print queries' result sets''' names = self.colnames