#!/usr/bin/env python # coding=utf-8 """A sample application for how Python scripting can provide conditional control flow of a cmd2 application. cmd2's built-in scripting capability which can be invoked via the "@" shortcut or "load" command and uses basic ASCII text scripts is very easy to use. Moreover, the trivial syntax of the script files where there is one command per line and the line is exactly what the user would type inside the application makes it so non-technical end users can quickly 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