We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6cb43c6 commit 5a28a87Copy full SHA for 5a28a87
examples/argparse_example.py
@@ -47,7 +47,7 @@ def __init__(self, ip_addr=None, port=None, transcript_files=None):
47
argparser.add_argument('-r', '--repeat', type=int, help='output [n] times')
48
argparser.add_argument('words', nargs='+', help='words to say')
49
@with_argument_parser(argparser)
50
- def do_speak(self, rawarg, args=None):
+ def do_speak(self, argv, args=None):
51
"""Repeats what you tell me to."""
52
words = []
53
for word in args.words:
@@ -71,7 +71,7 @@ def do_speak(self, rawarg, args=None):
71
argparser.add_argument('tag', nargs=1, help='tag')
72
argparser.add_argument('content', nargs='+', help='content to surround with tag')
73
74
- def do_tag(self, cmdline, args=None):
+ def do_tag(self, argv, args=None):
75
self.stdout.write('<{0}>{1}</{0}>'.format(args.tag[0], ' '.join(args.content)))
76
self.stdout.write('\n')
77
# self.stdout.write is better than "print", because Cmd can be
0 commit comments