summaryrefslogtreecommitdiff
path: root/examples/cmd_as_argument.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2020-02-04 23:01:30 -0500
committerTodd Leonhardt <todd.leonhardt@gmail.com>2020-02-04 23:01:30 -0500
commit40722f10ace3107dcb4709008239ac8233ada30f (patch)
tree676edd56ec5ba1287cd4f38b66f2733eea597ee9 /examples/cmd_as_argument.py
parent61dfcf613966355d68c01f2aa06f0158b54c1f20 (diff)
downloadcmd2-git-40722f10ace3107dcb4709008239ac8233ada30f.tar.gz
Added cmd2.utils.Settable to the cmd2 namespace and updated examples and docs
Diffstat (limited to 'examples/cmd_as_argument.py')
-rwxr-xr-xexamples/cmd_as_argument.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/cmd_as_argument.py b/examples/cmd_as_argument.py
index 08643a50..b65bcbcb 100755
--- a/examples/cmd_as_argument.py
+++ b/examples/cmd_as_argument.py
@@ -36,7 +36,7 @@ class CmdLineApp(cmd2.Cmd):
self.self_in_py = True
self.maxrepeats = 3
# Make maxrepeats settable at runtime
- self.settable['maxrepeats'] = 'max repetitions for speak command'
+ self.add_settable(cmd2.Settable('maxrepeats', int, 'max repetitions for speak command'))
speak_parser = argparse.ArgumentParser()
speak_parser.add_argument('-p', '--piglatin', action='store_true', help='atinLay')