# HG changeset patch # User catherine@Elli.myhome.westell.com # Date 1225888902 18000 # Node ID 7e3921829399546a97a6edfb2331bc0499c3a30f # Parent 3ce72ea76768f865c668dc0d61e0e9c3a681be1e about to remove failover diff -r 3ce72ea76768 -r 7e3921829399 sqlpython/sqlpyPlus.py --- a/sqlpython/sqlpyPlus.py Tue Oct 28 16:44:51 2008 -0400 +++ b/sqlpython/sqlpyPlus.py Wed Nov 05 07:41:42 2008 -0500 @@ -352,9 +352,13 @@ class sqlpyPlus(sqlpython.sqlpython): defaultExtension = 'sql' - sqlpython.sqlpython.shortcuts.update({':': 'setbind', '\\': 'psql', '@': '_load'}) + sqlpython.sqlpython.shortcuts.update({':': 'setbind', + '\\': 'psql', + '@': '_load', + '--': '_comment', + '/*': '_multiline_comment'}) multilineCommands = '''select insert update delete tselect - create drop alter'''.split() + create drop alter _multiline_comment'''.split() defaultFileName = 'afiedt.buf' def __init__(self): sqlpython.sqlpython.__init__(self) @@ -386,6 +390,11 @@ return cmd, arg, line do__load = Cmd.do_load + + def do__comment(self, arg): + pass + def do__multiline_comment(self, arg): + pass def onecmd_plus_hooks(self, line): line = self.precmd(line) diff -r 3ce72ea76768 -r 7e3921829399 sqlpython/sqlpython.py --- a/sqlpython/sqlpython.py Tue Oct 28 16:44:51 2008 -0400 +++ b/sqlpython/sqlpython.py Wed Nov 05 07:41:42 2008 -0500 @@ -149,7 +149,7 @@ def do_quit(self, arg): if self.commit_on_exit and hasattr(self, 'curs'): self.default('commit;') - cmd2.Cmd.do_quit() + return cmd2.Cmd.do_quit(self, None) do_exit = do_quit do_q = do_quit