diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-01-21 22:24:09 -0500 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-01-21 22:24:09 -0500 |
commit | c9f7c012bda012b4df7a8c5e853bd5d3e6d99b1b (patch) | |
tree | e2e2f7f6ade5e61a625a3737106918e5e4362aaa /examples/pirate.py | |
parent | 711d6380d347260a99d9ed77ce0afa7cdae67da7 (diff) | |
download | cmd2-git-c9f7c012bda012b4df7a8c5e853bd5d3e6d99b1b.tar.gz |
Renamed @with_argument_parser decorator to @with_argparser
Also:
- Reanamed foo and bar subcommand methods to base_foo and base_bar
Diffstat (limited to 'examples/pirate.py')
-rwxr-xr-x | examples/pirate.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/pirate.py b/examples/pirate.py index 06fdb61b..cfe545d6 100755 --- a/examples/pirate.py +++ b/examples/pirate.py @@ -7,7 +7,7 @@ presented as part of her PyCon 2010 talk. It demonstrates many features of cmd2. """ import argparse -from cmd2 import Cmd, with_argument_parser +from cmd2 import Cmd, with_argparser class Pirate(Cmd): @@ -78,7 +78,7 @@ class Pirate(Cmd): yo_parser.add_argument('-c', '--commas', action='store_true', help='Intersperse commas') yo_parser.add_argument('beverage', help='beverage to drink with the chant') - @with_argument_parser(yo_parser) + @with_argparser(yo_parser) def do_yo(self, args): """Compose a yo-ho-ho type chant with flexible options.""" chant = ['yo'] + ['ho'] * args.ho |