diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-03-18 22:49:42 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-18 22:49:42 -0400 |
commit | 2f24a8ad3eeb2fdf699d1e2a9d4f05429fe879c4 (patch) | |
tree | b836270cf61175d1e4a434fd8cae08f0ffd998a2 /examples/example.py | |
parent | 96d176cc3d8198913693a42c7dd983cf69a165bd (diff) | |
parent | 57dd827963491439e40eb5dfe20811c14ea757ff (diff) | |
download | cmd2-git-2f24a8ad3eeb2fdf699d1e2a9d4f05429fe879c4.tar.gz |
Merge branch 'master' into load_generate_transcript
Diffstat (limited to 'examples/example.py')
-rwxr-xr-x | examples/example.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/examples/example.py b/examples/example.py index 04727ec6..9f9c0304 100755 --- a/examples/example.py +++ b/examples/example.py @@ -27,16 +27,13 @@ class CmdLineApp(cmd2.Cmd): MUMBLE_LAST = ['right?'] def __init__(self): - self.multiline_commands = ['orate'] - self.maxrepeats = 3 - - # Add stuff to shortcuts before calling base class initializer - self.shortcuts.update({'&': 'speak'}) - + shortcuts = dict(self.DEFAULT_SHORTCUTS) + shortcuts.update({'&': 'speak'}) # Set use_ipython to True to enable the "ipy" command which embeds and interactive IPython shell - super().__init__(use_ipython=False) + super().__init__(use_ipython=False, multiline_commands=['orate'], shortcuts=shortcuts) # Make maxrepeats settable at runtime + self.maxrepeats = 3 self.settable['maxrepeats'] = 'max repetitions for speak command' speak_parser = argparse.ArgumentParser() |