diff options
author | kotfu <kotfu@kotfu.net> | 2018-01-07 20:02:38 -0700 |
---|---|---|
committer | kotfu <kotfu@kotfu.net> | 2018-01-07 20:02:38 -0700 |
commit | 6cb43c600f0b5d694201233ade6abd4f989d1730 (patch) | |
tree | c9acbeaf507a762db0b05b32a1e824b479279bfe /examples/argparse_example.py | |
parent | 8c58bb558adceb8ff32c7a3e1a88d2a13371dbfa (diff) | |
download | cmd2-git-6cb43c600f0b5d694201233ade6abd4f989d1730.tar.gz |
Set prog in argparser based on the name of the function
Diffstat (limited to 'examples/argparse_example.py')
-rwxr-xr-x | examples/argparse_example.py | 5 |
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) |