summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2017-03-11 10:26:34 -0500
committerTodd Leonhardt <todd.leonhardt@gmail.com>2017-03-11 10:26:34 -0500
commit31036ef97bba35763b2025c4ea6befd872b69276 (patch)
tree298377bc58042f11428b01883954391c4596a141 /docs
parentabe33f2813ecf7f2caaf6cf192394d7e56473563 (diff)
downloadcmd2-git-31036ef97bba35763b2025c4ea6befd872b69276.tar.gz
Added an example for how conditional control flow of a cmd2 application can be achieved via the py command and python scripts.
Diffstat (limited to 'docs')
-rw-r--r--docs/freefeatures.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/freefeatures.rst b/docs/freefeatures.rst
index a767ac8c..a036973d 100644
--- a/docs/freefeatures.rst
+++ b/docs/freefeatures.rst
@@ -154,6 +154,13 @@ and any variables created or changed will persist for the life of the applicatio
(Cmd) py print(x)
5
+The ``py`` command also allows you to run Python scripts via ``py run('myscript.py')``.
+This provides a more complicated and more powerful scripting capability than that
+provided by the simple text file scripts discussed in :ref:`scripts`. Python scripts can include
+conditional control flow logic. See the **python_scripting.py** ``cmd2`` application and
+the **script_conditional.py** script in the ``examples`` source code directory for an
+example of how to achieve this in your own applications.
+
IPython (optional)
==================