comparison cmd2.py @ 317:de23e595bb5c

experiments with line flattening
author cat@eee
date Thu, 11 Feb 2010 09:08:22 -0500
parents 0687bb650118
children c58cd7e48db7
comparison
equal deleted inserted replaced
316:8a76f597d2f9 317:de23e595bb5c
423 self._init_parser() 423 self._init_parser()
424 self.pystate = {} 424 self.pystate = {}
425 self.shortcuts = sorted(self.shortcuts.items(), reverse=True) 425 self.shortcuts = sorted(self.shortcuts.items(), reverse=True)
426 self.keywords = self.reserved_words + [fname[3:] for fname in dir(self) 426 self.keywords = self.reserved_words + [fname[3:] for fname in dir(self)
427 if fname.startswith('do_')] 427 if fname.startswith('do_')]
428 import pdb; pdb.set_trace()
429 def linelist(arg):
430 result = []
431
428 self.settable = (l.strip() for l in self.settable if l.strip()) 432 self.settable = (l.strip() for l in self.settable if l.strip())
429 self.settable = dict(ljust(l.split(None,1), 2, '') for l in self.settable) 433 self.settable = dict(ljust(l.split(None,1), 2, '') for l in self.settable)
430 self.doubleDashComment = pyparsing.NotAny(pyparsing.Or(options_defined)) + pyparsing.Literal('--') + pyparsing.restOfLine 434 self.doubleDashComment = pyparsing.NotAny(pyparsing.Or(options_defined)) + pyparsing.Literal('--') + pyparsing.restOfLine
431 435
432 def do_shortcuts(self, args): 436 def do_shortcuts(self, args):