summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2019-06-15 00:53:23 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2019-06-15 00:53:23 -0400
commitbeb2b37e5488965f7b2e240ea7453234bcbd3cd1 (patch)
tree9ec803a7036d5f3d680610ab5daba78e5c38a37d /examples
parentdf8679b3331a8aebd3af4bbe2a0c6e625346f348 (diff)
downloadcmd2-git-beb2b37e5488965f7b2e240ea7453234bcbd3cd1.tar.gz
Updated documentation
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/python_scripting.py4
-rw-r--r--examples/scripts/conditional.py2
-rw-r--r--examples/scripts/nested.txt6
-rw-r--r--examples/scripts/save_help_text.py2
4 files changed, 7 insertions, 7 deletions
diff --git a/examples/python_scripting.py b/examples/python_scripting.py
index da7d0f6a..88bc2f98 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 pyscript
-command and the "pyscript <script> [arguments]" syntax comes into play.
+from the previous command. This is where the ability to run Python scripts inside a cmd2 application via the
+run_pyscript command and the "run_pyscript <script> [arguments]" syntax comes into play.
This application and the "scripts/conditional.py" script serve as an example for one way in which this can be done.
"""
diff --git a/examples/scripts/conditional.py b/examples/scripts/conditional.py
index 8a4f14de..724bb3ee 100644
--- a/examples/scripts/conditional.py
+++ b/examples/scripts/conditional.py
@@ -5,7 +5,7 @@ This is a Python script intended to be used with the "python_scripting.py" cmd2
To run it you should do the following:
./python_scripting.py
- pyscript scripts/conditional.py directory_path
+ run_pyscript scripts/conditional.py directory_path
Note: The "app" function is defined within the cmd2 embedded Python environment and in there "self" is your cmd2
application instance. Note: self only exists in this environment if locals_in_py is True.
diff --git a/examples/scripts/nested.txt b/examples/scripts/nested.txt
index 9ec26160..1b7e2035 100644
--- a/examples/scripts/nested.txt
+++ b/examples/scripts/nested.txt
@@ -1,3 +1,3 @@
-!echo "Doing a relative load"
-_relative_load script.txt
-
+!echo "Doing a relative run script"
+_relative_run_script script.txt
+
diff --git a/examples/scripts/save_help_text.py b/examples/scripts/save_help_text.py
index 73434a31..a68b0ad9 100644
--- a/examples/scripts/save_help_text.py
+++ b/examples/scripts/save_help_text.py
@@ -2,7 +2,7 @@
# flake8: noqa F821
"""
A cmd2 script that saves the help text for every command, sub-command, and topic to a file.
-This is meant to be run within a cmd2 session using pyscript.
+This is meant to be run within a cmd2 session using run_pyscript.
"""
import argparse