summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2017-06-21 06:54:58 -0400
committerTodd Leonhardt <todd.leonhardt@gmail.com>2017-06-21 06:54:58 -0400
commit98b57f380d4bedbbe9a0eea174075f8c62aea6bd (patch)
tree2b1a212898dfdc14be9f952585fd3c5abed42102 /examples
parent1b829f13cfa9460ddb6304d507ea30bfbb31c6e7 (diff)
downloadcmd2-git-98b57f380d4bedbbe9a0eea174075f8c62aea6bd.tar.gz
Moved example scripts from examples to examples/scripts directly
Cleaned up the examples directory by adding a scripts subdirectory. This makes it a bit clearer which Python files are example cmd2 applications and which are example Python scripts for use with the pyscript command.
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/python_scripting.py2
-rwxr-xr-xexamples/scripts/arg_printer.py (renamed from examples/arg_printer.py)0
-rw-r--r--examples/scripts/conditional.py (renamed from examples/script_conditional.py)2
-rw-r--r--examples/scripts/script.py (renamed from examples/script.py)0
-rw-r--r--examples/scripts/script.txt (renamed from examples/script.txt)0
5 files changed, 2 insertions, 2 deletions
diff --git a/examples/python_scripting.py b/examples/python_scripting.py
index 716a18a3..a0d36e36 100755
--- a/examples/python_scripting.py
+++ b/examples/python_scripting.py
@@ -12,7 +12,7 @@ users will want to create a script with conditional control flow - where the nex
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.
+This application and the "scripts/conditional.py" script serve as an example for one way in which this can be done.
"""
import functools
import os
diff --git a/examples/arg_printer.py b/examples/scripts/arg_printer.py
index 848dcf99..848dcf99 100755
--- a/examples/arg_printer.py
+++ b/examples/scripts/arg_printer.py
diff --git a/examples/script_conditional.py b/examples/scripts/conditional.py
index c26bd5fe..1eeeadba 100644
--- a/examples/script_conditional.py
+++ b/examples/scripts/conditional.py
@@ -4,7 +4,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 script_conditional.py directory_path
+ pyscript scripts/conditional.py directory_path
Note: The "cmd" function is defined within the cmd2 embedded Python environment and in there "self" is your cmd2
application instance.
diff --git a/examples/script.py b/examples/scripts/script.py
index 3f60c8fb..3f60c8fb 100644
--- a/examples/script.py
+++ b/examples/scripts/script.py
diff --git a/examples/script.txt b/examples/scripts/script.txt
index 1e18262a..1e18262a 100644
--- a/examples/script.txt
+++ b/examples/scripts/script.txt