summaryrefslogtreecommitdiff
path: root/examples/example.py
diff options
context:
space:
mode:
authorkotfu <kotfu@kotfu.net>2019-07-06 17:52:19 -0600
committerGitHub <noreply@github.com>2019-07-06 17:52:19 -0600
commit34975b52e769514b44ee8c13147a22961e68e7a7 (patch)
treefe93e18257514efc25e8539d5005af34ef4dcd3b /examples/example.py
parente18013e7f6be6721531cde163ec4697eac247270 (diff)
parent0ae0567c48c0519cbecca8448df0caa32f530906 (diff)
downloadcmd2-git-34975b52e769514b44ee8c13147a22961e68e7a7.tar.gz
Merge pull request #712 from python-cmd2/docstructure
New Documentation Structure
Diffstat (limited to 'examples/example.py')
-rwxr-xr-xexamples/example.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/example.py b/examples/example.py
index 24be5d5d..a62c258b 100755
--- a/examples/example.py
+++ b/examples/example.py
@@ -26,10 +26,9 @@ class CmdLineApp(cmd2.Cmd):
MUMBLE_LAST = ['right?']
def __init__(self):
- shortcuts = dict(cmd2.DEFAULT_SHORTCUTS)
+ shortcuts = cmd2.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, multiline_commands=['orate'], shortcuts=shortcuts)
+ super().__init__(multiline_commands=['orate'], shortcuts=shortcuts)
# Make maxrepeats settable at runtime
self.maxrepeats = 3
@@ -52,7 +51,7 @@ class CmdLineApp(cmd2.Cmd):
word = word.upper()
words.append(word)
repetitions = args.repeat or 1
- for i in range(min(repetitions, self.maxrepeats)):
+ for _ in range(min(repetitions, self.maxrepeats)):
# .poutput handles newlines, and accommodates output redirection too
self.poutput(' '.join(words))