summaryrefslogtreecommitdiff
path: root/examples/script_conditional.py
Commit message (Collapse)AuthorAgeFilesLines
* Moved example scripts from examples to examples/scripts directlyTodd Leonhardt2017-06-211-39/+0
| | | | | | 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.
* Updated documentation and examplesTodd Leonhardt2017-06-141-13/+22
| | | | | | | | | 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
* Improved the CmdResult namedtuple subclassTodd Leonhardt2017-03-141-1/+7
| | | | | | The last two arguments (err and war) are now optional. Only the 1st argument (out) is required. err and war default to empty strings.
* Mostly fix a bunch of spelling mistakes.Todd Leonhardt2017-03-131-1/+1
| | | | A few other miscellaneous minor tweaks for whitespace and such.
* Added an example for how conditional control flow of a cmd2 application can ↵Todd Leonhardt2017-03-111-0/+24
be achieved via the py command and python scripts.