How to use pydoc?

Peter Otten __peter__ at web.de
Fri Dec 16 14:56:19 EST 2005


newsposter at cox.net wrote:

> Thanks for replying Peter, but none of your suggestions are working.
> 
> S:\projects\C2PC\src>python -m
> Unknown option: -m
> usage: python [option] ... [-c cmd | file | -] [arg] ...
> 
> I should also be able to run 'pydoc -g' to start a webserver.

Do you have multiple versions of Python on your computer?

The -m option only works with python2.4, so it seems Windows invoked a wrong
(older) Python version. 

For older versions you can do

python c:\path\to\pydoc.py -g

Alternatively you can make sure you pick the right interpreter explicitly:

c:\path\to\python2.4\python.exe -m pydoc -g

> I guess I will have to write the author of pydoc for an answer.

If none of the above works, be patient. Someone with a fresher Python on
Windows experience will eventually speak up :-)

Peter




More information about the Python-list mailing list