Mercurial > sqlpython
changeset 250:aec778ef82b6
print full help on -h
author | catherine@Elli.myhome.westell.com |
---|---|
date | Thu, 12 Mar 2009 07:58:42 -0400 |
parents | 9e3e49c95abf |
children | aa33f495a289 |
files | setup.py sqlpython/mysqlpy.py sqlpython/sqlpyPlus.py sqlpython/sqlpython.py |
diffstat | 4 files changed, 23 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/setup.py Wed Mar 11 12:49:02 2009 -0400 +++ b/setup.py Thu Mar 12 07:58:42 2009 -0400 @@ -9,7 +9,7 @@ Operating System :: OS Independent""".splitlines() setup(name="sqlpython", - version="1.6.0", + version="1.6.1", 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="https://twiki.cern.ch/twiki/bin/view/PSSGroup/SqlPython", packages=find_packages(), include_package_data=True, - install_requires=['pyparsing','cmd2>=0.4.7','cx_Oracle','genshi>=0.5'], + install_requires=['pyparsing','cmd2>=0.4.8','cx_Oracle','genshi>=0.5'], keywords = 'client oracle database', license = 'MIT', platforms = ['any'],
--- a/sqlpython/mysqlpy.py Wed Mar 11 12:49:02 2009 -0400 +++ b/sqlpython/mysqlpy.py Thu Mar 12 07:58:42 2009 -0400 @@ -1,5 +1,5 @@ #!/usr/bin/python -# MySqlPy V1.6.0 +# MySqlPy V1.6.1 # Author: Luca.Canali@cern.ch # # @@ -13,9 +13,9 @@ class mysqlpy(sqlpyPlus): ''' -MySqlPy V1.6.0 - 'sqlplus in python' +MySqlPy V1.6.1 - 'sqlplus in python' Author: Luca.Canali@cern.ch -Rev: 1.6.0, 02-Mar-09 +Rev: 1.6.1, 15-Mar-09 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 @@ -106,6 +106,21 @@ which get and run SQL scripts from disk.''' self.onecmd(self.query_load10g) + @options([make_option('-u', '--uppercase', action='store_true', + help='use ALL CAPS')]) + def do_greet(self, args, opts): + ''' + Documentation for the command goes into this string + at the beginning of the method. + ''' + result = 'Hello' + for name in args.split(): + result += ',' + name + result += '!\n' + if opts.uppercase: + result = result.upper() + self.stdout.write(result) + def do_db(self,args,filepath='pass.txt'): '''Exec do_connect to db_alias in args (credentials form the file pass.txt) ''' f = open(filepath,'r')
--- a/sqlpython/sqlpyPlus.py Wed Mar 11 12:49:02 2009 -0400 +++ b/sqlpython/sqlpyPlus.py Thu Mar 12 07:58:42 2009 -0400 @@ -1034,7 +1034,7 @@ except KeyError: self.stdout.write('No bind variable %s\n' % arg) else: - for (var, val) in self.binds.items(): + for (var, val) in sorted(self.binds.items()): print ':%s = %s' % (var, val) assignmentScanner = Parser(pyparsing.Literal(':=') ^ '=')
--- a/sqlpython/sqlpython.py Wed Mar 11 12:49:02 2009 -0400 +++ b/sqlpython/sqlpython.py Thu Mar 12 07:58:42 2009 -0400 @@ -1,5 +1,5 @@ # -# SqlPython V1.6.0 +# SqlPython V1.6.1 # Author: Luca.Canali@cern.ch, Apr 2006 # Rev 25-Feb-09 # @@ -10,7 +10,7 @@ import cmd2,getpass,binascii,cx_Oracle,re,os import sqlpyPlus -__version__ = '1.6.0' +__version__ = '1.6.1' class sqlpython(cmd2.Cmd): '''A python module to reproduce Oracle's command line with focus on customization and extention'''