comparison cmd2.py @ 271:fd40eca6939a

colors
author Catherine Devlin <catherine.devlin@gmail.com>
date Thu, 09 Apr 2009 00:15:33 -0400
parents 194160b7f091
children fd5197498667
comparison
equal deleted inserted replaced
270:194160b7f091 271:fd40eca6939a
317 else: 317 else:
318 cmd.Cmd.do_help(self, arg) 318 cmd.Cmd.do_help(self, arg)
319 319
320 def __init__(self, *args, **kwargs): 320 def __init__(self, *args, **kwargs):
321 cmd.Cmd.__init__(self, *args, **kwargs) 321 cmd.Cmd.__init__(self, *args, **kwargs)
322 self.initial_stdout = sys.stdout
322 self.history = History() 323 self.history = History()
323 self._init_parser() 324 self._init_parser()
324 self.pystate = {} 325 self.pystate = {}
325 self.shortcuts = sorted(self.shortcuts.items(), reverse=True) 326 self.shortcuts = sorted(self.shortcuts.items(), reverse=True)
326 self.keywords = self.reserved_words + [fname[3:] for fname in dir(self) 327 self.keywords = self.reserved_words + [fname[3:] for fname in dir(self)