Mercurial > sqlpython
changeset 443:cd015f2bff44
synch with work
author | catherine@Drou |
---|---|
date | Mon, 08 Feb 2010 08:00:08 -0500 |
parents | 5497ae28bc70 |
children | e89db2eaa0b4 |
files | setup.py sqlpython/mysqlpy.py sqlpython/sqlpython.py |
diffstat | 3 files changed, 11 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- 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'],
--- 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
--- 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