How to use pydoc?
Peter Otten
__peter__ at web.de
Fri Dec 16 10:40:15 EST 2005
newsposter at cox.net wrote:
>>>> import pydoc
>>>> import sys
>>>> sys.version
> '2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)]'
>>>> pydoc sys
> SyntaxError: invalid syntax
>>>>
>
> The documentation for pydoc says:
> "Run "pydoc <name>" to show documentation on something."
>
> What am I missing?
In the interpreter, just do
>>> help(sys)
or
>>> help("sys")
if you didn't already import the module.
What you tried is what you would do on the command line. I'm not sure it
works on windows, though, but
python -m pydoc sys
Should work on both windows and unix.
Peter
More information about the Python-list
mailing list