On my linux system pydoc doesn't seem able to find
modules in the current directory unless I set the
PYTHONPATH environment variable, including ".":
% pydoc OO_Model
No Python documentation found for 'OO_Model'.
beluga:lib% PYTHONPATH=. pydoc OO_Model
Python Library Documentation: module OO_Model
...
I examined the output of pydoc.pathdirs(). Even
without setting PYTHONPATH the directory containing the
OO_Model module is in the output (second directory):
% python
Python 2.1b1 (#1, Mar 12 2001, 16:13:37)
[GCC 2.95.3 19991030 (prerelease)] on linux2
Type "copyright", "credits" or "license" for more
information.
>>> import pydoc
>>> pydoc.pathdirs()
['/usr/local/lib/automatrix/python',
'/home/skip/src/tttech/lib',
'/usr/local/lib/python2.1',
'/usr/local/lib/python2.1/plat-linux2',
'/usr/local/lib/python2.1/lib-tk',
'/usr/local/lib/python2.1/lib-dynload',
'/usr/local/lib/python2.1/site-packages',
'/home/skip/src/Zope/lib/python']
Seems like a bug to me.
|