summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rwxr-xr-xREADME.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/README.md b/README.md
index cfb071cc..7bec9734 100755
--- a/README.md
+++ b/README.md
@@ -229,6 +229,7 @@ import argparse
import random
import sys
import cmd2
+from cmd2.utils import Settable
class CmdLineApp(cmd2.Cmd):
""" Example cmd2 application. """
@@ -248,7 +249,7 @@ class CmdLineApp(cmd2.Cmd):
super().__init__(use_ipython=False, multiline_commands=['orate'], shortcuts=shortcuts)
# Make maxrepeats settable at runtime
- self.settable['maxrepeats'] = 'max repetitions for speak command'
+ self.add_settable(Settable('maxrepeats', int, 'max repetitions for speak command'))
speak_parser = argparse.ArgumentParser()
speak_parser.add_argument('-p', '--piglatin', action='store_true', help='atinLay')