Mercurial > python-cmd2
comparison cmd2.py @ 241:af17ead6449d
shortened docstring to avoid word wrap
author | catherine@dellzilla |
---|---|
date | Tue, 24 Mar 2009 15:25:28 -0400 |
parents | a31cf334bc16 |
children | d36ffc16f575 |
comparison
equal
deleted
inserted
replaced
240:a31cf334bc16 | 241:af17ead6449d |
---|---|
789 return | 789 return |
790 | 790 |
791 def do_py(self, arg): | 791 def do_py(self, arg): |
792 ''' | 792 ''' |
793 py <command>: Executes a Python command. | 793 py <command>: Executes a Python command. |
794 py: Enters interactive Python mode; end with `Ctrl-D`, `quit()`, or 'exit`. | 794 py: Enters interactive Python mode; `Ctrl-D`, `quit()`, 'exit()` ends. |
795 Non-python commands can be issued with cmd('your non-python command here'). | 795 Non-python commands can be issued with `cmd("your command")`. |
796 ''' | 796 ''' |
797 if arg.strip(): | 797 if arg.strip(): |
798 interp = InteractiveInterpreter(locals=self.pystate) | 798 interp = InteractiveInterpreter(locals=self.pystate) |
799 interp.runcode(arg) | 799 interp.runcode(arg) |
800 else: | 800 else: |