Add docstring to cmd.Cmd.do_help()
This commit is contained in:
parent
bd889e8c40
commit
44d7b6ad60
|
@ -312,10 +312,6 @@ blank lines to repeat commands, and the simple record and playback facility::
|
|||
bye color goto home playback record right
|
||||
circle forward heading left position reset undo
|
||||
|
||||
Undocumented commands:
|
||||
======================
|
||||
help
|
||||
|
||||
(turtle) help forward
|
||||
Move the turtle forward by the specified distance: FORWARD 10
|
||||
(turtle) record spiral.cmd
|
||||
|
|
|
@ -288,6 +288,7 @@ class Cmd:
|
|||
return list(commands | topics)
|
||||
|
||||
def do_help(self, arg):
|
||||
'List available commands with "help" or detailed help with "help cmd".'
|
||||
if arg:
|
||||
# XXX check arg syntax
|
||||
try:
|
||||
|
|
|
@ -84,11 +84,11 @@ class samplecmdclass(cmd.Cmd):
|
|||
<BLANKLINE>
|
||||
Documented commands (type help <topic>):
|
||||
========================================
|
||||
add
|
||||
add help
|
||||
<BLANKLINE>
|
||||
Undocumented commands:
|
||||
======================
|
||||
exit help shell
|
||||
exit shell
|
||||
<BLANKLINE>
|
||||
|
||||
Test for the function print_topics():
|
||||
|
@ -125,11 +125,11 @@ class samplecmdclass(cmd.Cmd):
|
|||
<BLANKLINE>
|
||||
Documented commands (type help <topic>):
|
||||
========================================
|
||||
add
|
||||
add help
|
||||
<BLANKLINE>
|
||||
Undocumented commands:
|
||||
======================
|
||||
exit help shell
|
||||
exit shell
|
||||
<BLANKLINE>
|
||||
help text for add
|
||||
Hello from postloop
|
||||
|
|
Loading…
Reference in New Issue