summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorkotfu <kotfu@kotfu.net>2018-01-07 20:02:38 -0700
committerkotfu <kotfu@kotfu.net>2018-01-07 20:02:38 -0700
commit6cb43c600f0b5d694201233ade6abd4f989d1730 (patch)
treec9acbeaf507a762db0b05b32a1e824b479279bfe /examples
parent8c58bb558adceb8ff32c7a3e1a88d2a13371dbfa (diff)
downloadcmd2-git-6cb43c600f0b5d694201233ade6abd4f989d1730.tar.gz
Set prog in argparser based on the name of the function
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/argparse_example.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/examples/argparse_example.py b/examples/argparse_example.py
index c6a17435..a387acc3 100755
--- a/examples/argparse_example.py
+++ b/examples/argparse_example.py
@@ -67,10 +67,7 @@ class CmdLineApp(Cmd):
do_orate = do_speak # another synonym, but this one takes multi-line input
- argparser = argparse.ArgumentParser(
- prog='tag',
- description='create a html tag',
- )
+ argparser = argparse.ArgumentParser(description='create a html tag')
argparser.add_argument('tag', nargs=1, help='tag')
argparser.add_argument('content', nargs='+', help='content to surround with tag')
@with_argument_parser(argparser)