summaryrefslogtreecommitdiff
path: root/example/example.py
diff options
context:
space:
mode:
Diffstat (limited to 'example/example.py')
-rwxr-xr-xexample/example.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/example/example.py b/example/example.py
index 9d17bbb7..863084cd 100755
--- a/example/example.py
+++ b/example/example.py
@@ -1,4 +1,4 @@
-
+# coding=utf-8
"""A sample application for cmd2.
"""
@@ -15,7 +15,7 @@ class CmdLineApp(Cmd):
@options([make_option('-p', '--piglatin', action="store_true", help="atinLay"),
make_option('-s', '--shout', action="store_true", help="N00B EMULATION MODE"),
make_option('-r', '--repeat', type="int", help="output [n] times")
- ], arg_desc = '(text to say)')
+ ], arg_desc='(text to say)')
def do_speak(self, arg, opts=None):
"""Repeats what you tell me to."""
arg = ''.join(arg)
@@ -30,8 +30,9 @@ class CmdLineApp(Cmd):
# self.stdout.write is better than "print", because Cmd can be
# initialized with a non-standard output destination
- do_say = do_speak # now "say" is a synonym for "speak"
- do_orate = do_speak # another synonym, but this one takes multi-line input
+ do_say = do_speak # now "say" is a synonym for "speak"
+ do_orate = do_speak # another synonym, but this one takes multi-line input
+
c = CmdLineApp()
c.cmdloop()