changeset 382:2687482dfa33

doubledashcomment moved into sqlpyPlus to define parser after local comment definition
author catherine@Drou
date Mon, 01 Mar 2010 23:26:55 -0500
parents 04897151927b
children 2594f69698b2
files cmd2.py
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/cmd2.py	Mon Mar 01 06:57:10 2010 -0500
+++ b/cmd2.py	Mon Mar 01 23:26:55 2010 -0500
@@ -471,15 +471,11 @@
         cmd.Cmd.__init__(self, *args, **kwargs)
         self.initial_stdout = sys.stdout
         self.history = History()
-        self._init_parser()
         self.pystate = {}
         self.shortcuts = sorted(self.shortcuts.items(), reverse=True)
         self.keywords = self.reserved_words + [fname[3:] for fname in dir(self) 
-                                               if fname.startswith('do_')] 
-        def linelist(arg):
-            result = []
-            
-        self.doubleDashComment = pyparsing.NotAny(pyparsing.Or(options_defined)) + pyparsing.Literal('--') + pyparsing.restOfLine        
+                                               if fname.startswith('do_')]            
+        self._init_parser()
             
     def do_shortcuts(self, args):
         """Lists single-key shortcuts available."""