diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-08-27 13:19:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-27 13:19:23 -0400 |
commit | f4943a904efba05c13eb930b4a4535c19429c72c (patch) | |
tree | cbaff855e2d73f1d86ae1230f32770e31c62ad6b /examples | |
parent | 97c348c599d8fa963553593e5c19fb100b85e313 (diff) | |
parent | 478ea83336a4d1659ad06ef365db3dc5e051e46d (diff) | |
download | cmd2-git-f4943a904efba05c13eb930b4a4535c19429c72c.tar.gz |
Merge pull request #985 from python-cmd2/dynamic_value
Added Cmd2AttributeWrapper class
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/decorator_example.py | 2 | ||||
-rw-r--r-- | examples/modular_subcommands.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/decorator_example.py b/examples/decorator_example.py index 5b721da6..1b6d7570 100755 --- a/examples/decorator_example.py +++ b/examples/decorator_example.py @@ -67,7 +67,7 @@ class CmdLineApp(cmd2.Cmd): def do_tag(self, args: argparse.Namespace): """create an html tag""" # The Namespace always includes the Statement object created when parsing the command line - statement = args.get_statement() + statement = args.cmd2_statement.get() self.poutput("The command line you ran was: {}".format(statement.command_and_args)) self.poutput("It generated this tag:") diff --git a/examples/modular_subcommands.py b/examples/modular_subcommands.py index 44d4edd8..0b1f4ed3 100644 --- a/examples/modular_subcommands.py +++ b/examples/modular_subcommands.py @@ -98,7 +98,7 @@ class ExampleApp(cmd2.Cmd): @with_argparser(cut_parser) def do_cut(self, ns: argparse.Namespace): # Call handler for whatever subcommand was selected - handler = ns.get_handler() + handler = ns.cmd2_handler.get() if handler is not None: handler(ns) else: |