# HG changeset patch # User catherine@cordelia # Date 1246885435 14400 # Node ID 388ee8fa5664747254b43b687598a293590c8353 # Parent 15ba1cb88e4c84cd5a74d51c3fc7da2154906c55 fixed raw SHOW bug diff -r 15ba1cb88e4c -r 388ee8fa5664 sqlpython/sqlpyPlus.py --- a/sqlpython/sqlpyPlus.py Mon Jul 06 08:48:27 2009 -0400 +++ b/sqlpython/sqlpyPlus.py Mon Jul 06 09:03:55 2009 -0400 @@ -347,7 +347,7 @@ def __init__(self): sqlpython.sqlpython.__init__(self) self.binds = CaselessDict() - self.settable += 'autobind bloblimit colors commit_on_exit maxfetch maxtselctrows rows_remembered scan serveroutput sql_echo timeout heading wildsql'.split() + self.settable += 'autobind bloblimit colors commit_on_exit maxfetch maxtselctrows rows_remembered scan serveroutput sql_echo timeout heading wildsql version'.split() self.settable.remove('case_insensitive') self.settable.sort() self.stdoutBeforeSpool = sys.stdout @@ -363,6 +363,7 @@ self.result_history = [] self.rows_remembered = 10000 self.bloblimit = 5 + self.version = 'SQLPython %s' % sqlpython.__version__ self.pystate = {'r': [], 'binds': self.binds, 'substs': self.substvars} # overrides cmd's parseline @@ -879,13 +880,15 @@ value FROM v$parameter WHERE name LIKE '%%%s%%';""" % paramname) else: argpieces = arg.lower().split() - flagless_argpieces = [a for a in argpieces if not a.startswith('-')] - for (kwd, shortcut) in (('ind', '\\di'), ('schema', '\\dn'), ('tablesp', '\\db'), - ('trig', '\\dt'), ('view', '\\dv'), ('cons', '\\dc'), - ('comm', '\\dd'), ('ref', 'ref')): - if flagless_argpieces[0].lower().startswith(kwd): - return self._show_shortcut(shortcut, argpieces) + argpieces = [a for a in argpieces if not a.startswith('-')] try: + for (kwd, shortcut) in ( + ('ind', '\\di'), ('schema', '\\dn'), + ('tablesp', '\\db'), ('trig', '\\dt'), + ('view', '\\dv'), ('cons', '\\dc'), + ('comm', '\\dd'), ('ref', 'ref')): + if argpieces[0].lower().startswith(kwd): + return self._show_shortcut(shortcut, argpieces) if argpieces[0][:3] == 'err': return self._show_errors(all_users=False, limit=1, targets=argpieces[1:]) elif (argpieces[0], argpieces[1][:3]) == ('all','err'): diff -r 15ba1cb88e4c -r 388ee8fa5664 sqlpython/sqlpython.py --- a/sqlpython/sqlpython.py Mon Jul 06 08:48:27 2009 -0400 +++ b/sqlpython/sqlpython.py Mon Jul 06 09:03:55 2009 -0400 @@ -10,7 +10,7 @@ import cmd2,getpass,binascii,cx_Oracle,re,os import sqlpyPlus, sqlalchemy, pyparsing -__version__ = '1.6.6' +__version__ = '1.6.7' class Parser(object): comment_def = "--" + ~ ('-' + pyparsing.CaselessKeyword('begin')) + pyparsing.ZeroOrMore(pyparsing.CharsNotIn("\n"))