Skip to content

Commit a77be18

Browse files
committed
Moved main.py to exampels/hello_cmd2.py and added some comments
1 parent 5fbbc53 commit a77be18

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env python
22
# coding=utf-8
3+
"""
4+
This is intended to be a completely bare-bones cmd2 application suitable for rapid testing and debugging.
5+
"""
36
from cmd2 import cmd2
47

58
if __name__ == '__main__':
@@ -8,5 +11,6 @@
811
# Set "use_ipython" to True to include the ipy command if IPython is installed, which supports advanced interactive
912
# debugging of your application via introspection on self.
1013
app = cmd2.Cmd(use_ipython=True, persistent_history_file='cmd2_history.txt')
11-
app.locals_in_py = True
14+
app.locals_in_py = True # Enable access to "self" within the py command
15+
app.debug = True # Show traceback if/when an exception occurs
1216
app.cmdloop()

0 commit comments

Comments
 (0)