summaryrefslogtreecommitdiff
path: root/examples/python_scripting.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2017-06-14 20:03:05 -0400
committerTodd Leonhardt <todd.leonhardt@gmail.com>2017-06-14 20:03:05 -0400
commit63d5be91462d897d8fb37b31802dab464d879c87 (patch)
treec9690a0c9212617186b598f770fd1b4faffc62f5 /examples/python_scripting.py
parent4b5c73a142cd1467855d1e2feca6cacd9c065378 (diff)
downloadcmd2-git-63d5be91462d897d8fb37b31802dab464d879c87.tar.gz
Updated documentation and examples
Added information related to the new pyscript command. The old way of running Python scripts via "py run()" should be considered deprecated. The new "pyscript" command is superior in two significant ways: 1) It supports tab-completion of file system paths 2) It allows the user to pass command-line arguments to scripts
Diffstat (limited to 'examples/python_scripting.py')
-rwxr-xr-xexamples/python_scripting.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/python_scripting.py b/examples/python_scripting.py
index baa15f3f..6c64dd9f 100755
--- a/examples/python_scripting.py
+++ b/examples/python_scripting.py
@@ -9,8 +9,8 @@ learn to create scripts.
However, there comes a time when technical end users want more capability and power. In particular it is common that
users will want to create a script with conditional control flow - where the next command run will depend on the results
-from the previous command. This is where the ability to run Python scripts inside a cmd2 application via the py command
-and the "py run('myscript.py')" syntax comes into play.
+from the previous command. This is where the ability to run Python scripts inside a cmd2 application via the pyscript
+command and the "pyscript <script> [arguments]" syntax comes into play.
This application and the "script_conditional.py" script serve as an example for one way in which this can be done.
"""