diff options
| author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-06-16 11:43:32 -0400 | 
|---|---|---|
| committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-06-16 11:43:32 -0400 | 
| commit | c08f48e254be65b9899f4597cd88f479c6442646 (patch) | |
| tree | b113e43c6da1f80ca92f6a1fb4ede73278cf716a /examples | |
| parent | 3beaa30ca6a873021241b88b7350fb3574b82e75 (diff) | |
| download | cmd2-git-c08f48e254be65b9899f4597cd88f479c6442646.tar.gz | |
Fixed a bunch of examples which were broken due to moving DEFAULT_SHORTCUTS from cmd2.py to constants.py
Diffstat (limited to 'examples')
| -rwxr-xr-x | examples/arg_print.py | 2 | ||||
| -rwxr-xr-x | examples/cmd_as_argument.py | 2 | ||||
| -rwxr-xr-x | examples/colors.py | 2 | ||||
| -rwxr-xr-x | examples/decorator_example.py | 2 | ||||
| -rwxr-xr-x | examples/example.py | 2 | ||||
| -rwxr-xr-x | examples/pirate.py | 2 | ||||
| -rwxr-xr-x | examples/plumbum_colors.py | 2 | 
7 files changed, 7 insertions, 7 deletions
diff --git a/examples/arg_print.py b/examples/arg_print.py index 48bcbd13..3f7f3815 100755 --- a/examples/arg_print.py +++ b/examples/arg_print.py @@ -19,7 +19,7 @@ class ArgumentAndOptionPrinter(cmd2.Cmd):      def __init__(self):          # Create command shortcuts which are typically 1 character abbreviations which can be used in place of a command -        shortcuts = dict(self.DEFAULT_SHORTCUTS) +        shortcuts = dict(cmd2.DEFAULT_SHORTCUTS)          shortcuts.update({'$': 'aprint', '%': 'oprint'})          super().__init__(shortcuts=shortcuts) diff --git a/examples/cmd_as_argument.py b/examples/cmd_as_argument.py index 1e7901b9..49a50670 100755 --- a/examples/cmd_as_argument.py +++ b/examples/cmd_as_argument.py @@ -28,7 +28,7 @@ class CmdLineApp(cmd2.Cmd):      MUMBLE_LAST = ['right?']      def __init__(self): -        shortcuts = dict(self.DEFAULT_SHORTCUTS) +        shortcuts = dict(cmd2.DEFAULT_SHORTCUTS)          shortcuts.update({'&': 'speak'})          # Set use_ipython to True to enable the "ipy" command which embeds and interactive IPython shell          super().__init__(allow_cli_args=False, use_ipython=True, multiline_commands=['orate'], shortcuts=shortcuts) diff --git a/examples/colors.py b/examples/colors.py index fdc0e0bd..f8a9dfdb 100755 --- a/examples/colors.py +++ b/examples/colors.py @@ -63,7 +63,7 @@ class CmdLineApp(cmd2.Cmd):      MUMBLE_LAST = ['right?']      def __init__(self): -        shortcuts = dict(self.DEFAULT_SHORTCUTS) +        shortcuts = dict(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=True, multiline_commands=['orate'], shortcuts=shortcuts) diff --git a/examples/decorator_example.py b/examples/decorator_example.py index bb0d58c0..4f68653e 100755 --- a/examples/decorator_example.py +++ b/examples/decorator_example.py @@ -19,7 +19,7 @@ import cmd2  class CmdLineApp(cmd2.Cmd):      """ Example cmd2 application. """      def __init__(self, ip_addr=None, port=None, transcript_files=None): -        shortcuts = dict(self.DEFAULT_SHORTCUTS) +        shortcuts = dict(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, transcript_files=transcript_files, multiline_commands=['orate'], diff --git a/examples/example.py b/examples/example.py index a1ec893c..24be5d5d 100755 --- a/examples/example.py +++ b/examples/example.py @@ -26,7 +26,7 @@ class CmdLineApp(cmd2.Cmd):      MUMBLE_LAST = ['right?']      def __init__(self): -        shortcuts = dict(self.DEFAULT_SHORTCUTS) +        shortcuts = dict(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) diff --git a/examples/pirate.py b/examples/pirate.py index 9abbe4e6..699ee80c 100755 --- a/examples/pirate.py +++ b/examples/pirate.py @@ -29,7 +29,7 @@ class Pirate(cmd2.Cmd):      """A piratical example cmd2 application involving looting and drinking."""      def __init__(self):          """Initialize the base class as well as this one""" -        shortcuts = dict(self.DEFAULT_SHORTCUTS) +        shortcuts = dict(cmd2.DEFAULT_SHORTCUTS)          shortcuts.update({'~': 'sing'})          super().__init__(multiline_commands=['sing'], terminators=[MULTILINE_TERMINATOR, '...'], shortcuts=shortcuts) diff --git a/examples/plumbum_colors.py b/examples/plumbum_colors.py index 774dc7e4..2c57c22b 100755 --- a/examples/plumbum_colors.py +++ b/examples/plumbum_colors.py @@ -66,7 +66,7 @@ class CmdLineApp(cmd2.Cmd):      MUMBLE_LAST = ['right?']      def __init__(self): -        shortcuts = dict(self.DEFAULT_SHORTCUTS) +        shortcuts = dict(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=True, multiline_commands=['orate'], shortcuts=shortcuts)  | 
