Bugs item #1628895, was opened at 2007-01-05 10:24
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1628895&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Skip Montanaro (montanaro)
Assigned to: Nobody/Anonymous (nobody)
Summary: Pydoc sets choices for doc locations incorrectly
Initial Comment:
In pydoc.Helper.__init__ I see this code:
execdir = os.path.dirname(sys.executable)
homedir = os.environ.get('PYTHONHOME')
for dir in [os.environ.get('PYTHONDOCS'),
homedir and os.path.join(homedir, 'doc'),
os.path.join(execdir, 'doc'),
'/usr/doc/python-docs-' + split(sys.version)[0],
'/usr/doc/python-' + split(sys.version)[0],
'/usr/doc/python-docs-' + sys.version[:3],
'/usr/doc/python-' + sys.version[:3],
os.path.join(sys.prefix,
'Resources/English.lproj/Documenta$ if dir and
os.path.isdir(os.path.join(dir, 'lib')):
self.docdir = dir
I think the third choice in the list of candidate directories is wrong.
execdir is the directory of the Python executable (e.g., it's /usr/local/bin by
default). I think it should be set as
execdir = os.path.dirname(os.path.dirname(sys.executable))
You're not going to find a "doc" directory in /usr/local/bin.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1628895&group_id=5470
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com