diff options
Diffstat (limited to 'README.md')
-rwxr-xr-x | README.md | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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') |