[Python-bugs-list] [ python-Bugs-410164 ] pydoc can't find module in current dir
noreply@sourceforge.net
noreply@sourceforge.net
Tue, 20 Mar 2001 22:00:21 -0800
Bugs item #410164, was updated on 2001-03-20 13:42
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=410164&group_id=5470
>Category: demos and tools
>Group: Feature Request
Status: Open
Priority: 5
Submitted By: Skip Montanaro (montanaro)
>Assigned to: Ka-Ping Yee (ping)
Summary: pydoc can't find module in current dir
Initial Comment:
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.
----------------------------------------------------------------------
>Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-03-20 22:00
Message:
Logged In: YES
user_id=3066
This ia a pydoc issue; sys.path for a script includes the
script dir but not (necessarily) the current dir.
Assigned to Ping.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=410164&group_id=5470