Support keyword and topics help in cli(). Fixes #715782.

This commit is contained in:
Martin v. Löwis 2003-06-14 09:03:46 +00:00
parent 17fb50790d
commit b8c084e82c
2 changed files with 8 additions and 4 deletions

View File

@ -2116,7 +2116,7 @@ def cli():
else: else:
writedoc(arg) writedoc(arg)
else: else:
doc(arg) help.help(arg)
except ErrorDuringImport, value: except ErrorDuringImport, value:
print value print value
@ -2126,9 +2126,11 @@ def cli():
%s <name> ... %s <name> ...
Show text documentation on something. <name> may be the name of a Show text documentation on something. <name> may be the name of a
function, module, or package, or a dotted reference to a class or Python keyword, topic, function, module, or package, or a dotted
function within a module or module in a package. If <name> contains reference to a class or function within a module or module in a
a '%s', it is used as the path to a Python source file to document. package. If <name> contains a '%s', it is used as the path to a
Python source file to document. If name is 'keywords', 'topics',
or 'modules', a listing of these things is displayed.
%s -k <keyword> %s -k <keyword>
Search for a keyword in the synopsis lines of all available modules. Search for a keyword in the synopsis lines of all available modules.

View File

@ -111,6 +111,8 @@ Library
Tools/Demos Tools/Demos
----------- -----------
- pydoc now offers help on keywords and topics.
- Tools/idle is gone; long live Lib/idlelib. - Tools/idle is gone; long live Lib/idlelib.
- diff.py is a new script for print file diffs in context, unified, or ndiff - diff.py is a new script for print file diffs in context, unified, or ndiff