From 40722f10ace3107dcb4709008239ac8233ada30f Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Tue, 4 Feb 2020 23:01:30 -0500 Subject: Added cmd2.utils.Settable to the cmd2 namespace and updated examples and docs --- examples/first_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/first_app.py') diff --git a/examples/first_app.py b/examples/first_app.py index b5bd07e9..d8272e86 100755 --- a/examples/first_app.py +++ b/examples/first_app.py @@ -27,7 +27,7 @@ class FirstApp(cmd2.Cmd): # Make maxrepeats settable at runtime self.maxrepeats = 3 - 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') -- cgit v1.2.1