Skip to content

Commit beb2b37

Browse files
committed
Updated documentation
1 parent df8679b commit beb2b37

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

examples/python_scripting.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
1010
However, there comes a time when technical end users want more capability and power. In particular it is common that
1111
users will want to create a script with conditional control flow - where the next command run will depend on the results
12-
from the previous command. This is where the ability to run Python scripts inside a cmd2 application via the pyscript
13-
command and the "pyscript <script> [arguments]" syntax comes into play.
12+
from the previous command. This is where the ability to run Python scripts inside a cmd2 application via the
13+
run_pyscript command and the "run_pyscript <script> [arguments]" syntax comes into play.
1414
1515
This application and the "scripts/conditional.py" script serve as an example for one way in which this can be done.
1616
"""

examples/scripts/conditional.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
To run it you should do the following:
77
./python_scripting.py
8-
pyscript scripts/conditional.py directory_path
8+
run_pyscript scripts/conditional.py directory_path
99
1010
Note: The "app" function is defined within the cmd2 embedded Python environment and in there "self" is your cmd2
1111
application instance. Note: self only exists in this environment if locals_in_py is True.

examples/scripts/nested.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
!echo "Doing a relative load"
2-
_relative_load script.txt
3-
1+
!echo "Doing a relative run script"
2+
_relative_run_script script.txt
3+

examples/scripts/save_help_text.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# flake8: noqa F821
33
"""
44
A cmd2 script that saves the help text for every command, sub-command, and topic to a file.
5-
This is meant to be run within a cmd2 session using pyscript.
5+
This is meant to be run within a cmd2 session using run_pyscript.
66
"""
77

88
import argparse

0 commit comments

Comments
 (0)