summaryrefslogtreecommitdiff
path: root/examples/argparse_example.py
diff options
context:
space:
mode:
authorkotfu <kotfu@kotfu.net>2018-01-07 20:18:55 -0700
committerkotfu <kotfu@kotfu.net>2018-01-07 20:18:55 -0700
commit5a28a87769e23578993c52cf9c5df1c9d9bb7f35 (patch)
tree12c03aa296d9e61f761f7a21173e3527beffe5b4 /examples/argparse_example.py
parent6cb43c600f0b5d694201233ade6abd4f989d1730 (diff)
downloadcmd2-git-5a28a87769e23578993c52cf9c5df1c9d9bb7f35.tar.gz
Clean up variable names
Diffstat (limited to 'examples/argparse_example.py')
-rwxr-xr-xexamples/argparse_example.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/argparse_example.py b/examples/argparse_example.py
index a387acc3..4c5d6f59 100755
--- a/examples/argparse_example.py
+++ b/examples/argparse_example.py
@@ -47,7 +47,7 @@ class CmdLineApp(Cmd):
argparser.add_argument('-r', '--repeat', type=int, help='output [n] times')
argparser.add_argument('words', nargs='+', help='words to say')
@with_argument_parser(argparser)
- def do_speak(self, rawarg, args=None):
+ def do_speak(self, argv, args=None):
"""Repeats what you tell me to."""
words = []
for word in args.words:
@@ -71,7 +71,7 @@ class CmdLineApp(Cmd):
argparser.add_argument('tag', nargs=1, help='tag')
argparser.add_argument('content', nargs='+', help='content to surround with tag')
@with_argument_parser(argparser)
- def do_tag(self, cmdline, args=None):
+ def do_tag(self, argv, args=None):
self.stdout.write('<{0}>{1}</{0}>'.format(args.tag[0], ' '.join(args.content)))
self.stdout.write('\n')
# self.stdout.write is better than "print", because Cmd can be