@@ -112,15 +112,15 @@ terminator
112
112
For many simple commands, like the ``echo `` command above, you can ignore the
113
113
``Statement `` object and all of it's attributes and just use the passed value
114
114
as a string. You might choose to use the ``argv `` attribute to do more
115
- sophisticated argument processing. Before you go to far down that path, you
115
+ sophisticated argument processing. Before you go too far down that path, you
116
116
should check out the :ref: `features/argument_processing:Argument Processing `
117
117
functionality included with ``cmd2 ``.
118
118
119
119
120
120
Return Values
121
121
-------------
122
122
123
- Most commands should return nothing (either my omitting a ``return `` statement,
123
+ Most commands should return nothing (either by omitting a ``return `` statement,
124
124
or by ``return None ``. This indicates that your command is finished (with or
125
125
without errors), and that ``cmd2 `` should prompt the user for more input.
126
126
@@ -142,7 +142,7 @@ The ``cmd2.Cmd`` object sets an ``exit_code`` attribute to zero when it is
142
142
instantiated. The value of this attribute is returned from the ``cmdloop() ``
143
143
call. Therefore, if you don't do anything with this attribute in your code,
144
144
``cmdloop() `` will (almost) always return zero. There are a few built-in
145
- ``cmd2 `` commands which set ``exit_code `` to ``-1 `` if an error occers .
145
+ ``cmd2 `` commands which set ``exit_code `` to ``-1 `` if an error occurs .
146
146
147
147
You can use this capability to easily return your own values to the operating
148
148
system shell::
@@ -157,7 +157,7 @@ system shell::
157
157
158
158
def do_bail(self, line):
159
159
"""Exit the application""
160
- self.poutput ("fatal error, exiting")
160
+ self.perror ("fatal error, exiting")
161
161
self.exit_code = 2
162
162
return true
163
163
@@ -178,7 +178,7 @@ the following interaction::
178
178
Exception Handling
179
179
------------------
180
180
181
- You may choose you may choose to catch and handle any exceptions which occur in
181
+ You may choose to catch and handle any exceptions which occur in
182
182
a command method. If the command method raises an exception, ``cmd2 `` will
183
183
catch it and display it for you. The `debug ` :ref: `setting
184
184
<features/settings:Settings>` controls how the exception is displayed. If
@@ -193,6 +193,6 @@ Disabling or Hiding Commands
193
193
See :ref: `features/disable_commands:Disabling Commands ` for details of how
194
194
to:
195
195
196
- - removing commands included in ``cmd2 ``
197
- - hiding commands from the help menu
198
- - disabling and re-enabling commands at runtime
196
+ - remove commands included in ``cmd2 ``
197
+ - hide commands from the help menu
198
+ - disable and re-enable commands at runtime
0 commit comments