pydoc script.py vs. pydoc scriptpy

BartlebyScrivener bscrivener42 at gmail.com
Sat Oct 20 11:02:26 EDT 2007


On Debian Etch, if ~/mypyscripts is in my bash PATH and also in
PYTHONPATH, I get the following pydoc behaviors. Maybe this is
intentional. I'm just checking to be sure I don't have something
misconfigured in my environment.

If I have two scripts or modules  in ~/mypyscripts: one script.py and
one scriptpy (no extension), and do:

$>pydoc script

I get the documentation strings for script.py.

However, if I do:

$>pydoc scriptpy

I get no doc strings, even if I am in the ~/mypyscripts directory,
error message:
"no Python documentation found for 'scriptpy'"

Instead I must do:

$>pydoc ~/mypyscripts/scriptpy

even though ~/mypyscripts is in both PATH and PYTHONPATH

Took me awhile to sort this out. Is this the way pydoc is supposed to
work?

thanks,

rpd




More information about the Python-list mailing list