summaryrefslogtreecommitdiff
path: root/examples/event_loops.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2017-03-13 21:40:56 -0400
committerTodd Leonhardt <todd.leonhardt@gmail.com>2017-03-13 21:40:56 -0400
commit8c1e01886853471d8dadd473f491f310937b01d0 (patch)
treef41bf6a8699495575640d0d8fda37d45d0e4d056 /examples/event_loops.py
parent8b0505c5ccdc7516572afe1426d82666f97232af (diff)
downloadcmd2-git-8c1e01886853471d8dadd473f491f310937b01d0.tar.gz
Mostly fix a bunch of spelling mistakes.
A few other miscellaneous minor tweaks for whitespace and such.
Diffstat (limited to 'examples/event_loops.py')
-rwxr-xr-xexamples/event_loops.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/event_loops.py b/examples/event_loops.py
index e3e5880c..24efa830 100755
--- a/examples/event_loops.py
+++ b/examples/event_loops.py
@@ -10,6 +10,7 @@ import cmd2
class Cmd2EventBased(cmd2.Cmd):
+ """Basic example of how to run cmd2 without it controlling the main loop."""
def __init__(self):
cmd2.Cmd.__init__(self)
@@ -20,7 +21,8 @@ if __name__ == '__main__':
app = Cmd2EventBased()
app.preloop()
- # Do this within whatever event loop mechanism you wish to run a single command
+ # Do this within whatever event loop mechanism you wish to run a single command.
+ # In this case, no prompt is generated, so you need to provide one and read the user's input.
app.onecmd_plus_hooks("help history")
app.postloop()