diff options
author | Eric Lin <anselor@gmail.com> | 2018-05-02 13:50:27 -0400 |
---|---|---|
committer | Eric Lin <anselor@gmail.com> | 2018-05-02 13:50:27 -0400 |
commit | d2d3c2f37d5324b5bc967fe268a92f9d563a3a30 (patch) | |
tree | ebbedced651a329a3ab11e963aaf19908aa6f524 /cmd2/cmd2.py | |
parent | 97668f9464a6a4cb89e82ccf1c1e8b78146a70fd (diff) | |
download | cmd2-git-d2d3c2f37d5324b5bc967fe268a92f9d563a3a30.tar.gz |
Updated some documentation.
Diffstat (limited to 'cmd2/cmd2.py')
-rwxr-xr-x | cmd2/cmd2.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index eb80351b..98adc01f 100755 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -2871,7 +2871,7 @@ Usage: Usage: unalias [-a] name [name ...] py <command>: Executes a Python command. py: Enters interactive Python mode. End with ``Ctrl-D`` (Unix) / ``Ctrl-Z`` (Windows), ``quit()``, '`exit()``. - Non-python commands can be issued with ``cmd("your command")``. + Non-python commands can be issued with ``pyscript_name("your command")``. Run python code from external script files with ``run("script.py")`` """ from .pyscript_bridge import PyscriptBridge @@ -2909,7 +2909,6 @@ Usage: Usage: unalias [-a] name [name ...] if self.locals_in_py: self.pystate['self'] = self - self.pystate['cmd'] = onecmd_plus_hooks localvars = self.pystate interp = InteractiveConsole(locals=localvars) @@ -2932,9 +2931,10 @@ Usage: Usage: unalias [-a] name [name ...] keepstate = Statekeeper(sys, ('stdin', 'stdout')) sys.stdout = self.stdout sys.stdin = self.stdin + docstr = self.do_py.__doc__.replace('pyscript_name', self.pyscript_name) interp.interact(banner="Python %s on %s\n%s\n(%s)\n%s" % (sys.version, sys.platform, cprt, self.__class__.__name__, - self.do_py.__doc__)) + docstr)) except EmbeddedConsoleExit: pass if keepstate is not None: |