homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: python search path - .pth recursion
Type: behavior Stage:
Components: Documentation Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Matt.B, brett.cannon, gbloisi, georg.brandl, ggenellina, gwideman, janssen, jolleyjoe
Priority: normal Keywords:

Created on 2008年10月03日 21:15 by jolleyjoe, last changed 2022年04月11日 14:56 by admin. This issue is now closed.

Messages (3)
msg74274 - (view) Author: jolleyjoe (jolleyjoe) Date: 2008年10月03日 21:15
I have an a.pth file in dir_a with a line that says:
dir_b
In dir_b, I have a b.pth file that lists some eggs in dir_b:
JCC-1.9-py2.5-linux-i686.egg
lucene-2.3.2-py2.5-linux-i686.egg
From http://www.python.org/doc/2.5.2/inst/search-path.html:
"Paths can be absolute or relative, in which case they're relative to
the directory containing the .pth file. Any directories added to the
search path will be scanned in turn for .pth files. See site module
documentation for more information."
I assume that .pth files are scanned recursively... is this true?
I found an old ticket here: http://bugs.python.org/issue1431, but it
wasn't clear how it concludes (ie: do .pth files get scanned recursively
for directories to add to the search path or not).
msg92797 - (view) Author: Bill Janssen (janssen) * (Python committer) Date: 2009年09月17日 21:37
Looks like 1431 was closed by removing a line from the documentation, so
it's not surprising that it's not clear.
msg161360 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2012年05月22日 14:55
The docs for 2.7 are a little more clear: http://docs.python.org/install/index.html#inst-search-path says it is not recursive. And looking at the code (http://hg.python.org/cpython/file/086afe7b61f5/Lib/site.py#l184) backs that up.
History
Date User Action Args
2022年04月11日 14:56:40adminsetgithub: 48283
2012年05月22日 14:55:27brett.cannonsetstatus: open -> closed
resolution: out of date
messages: + msg161360
2012年05月22日 02:23:33eric.araujosetnosy: + brett.cannon, ggenellina, gbloisi

versions: + Python 3.3, - Python 3.1
2012年05月21日 21:58:33Matt.Bsetnosy: + Matt.B
2011年03月08日 13:04:37gwidemansetnosy: + gwideman
2010年10月29日 10:07:21adminsetassignee: georg.brandl -> docs@python
2010年08月03日 22:00:56terry.reedysetversions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.5
2009年09月17日 21:37:58janssensetnosy: + janssen
messages: + msg92797
2008年10月03日 21:15:08jolleyjoecreate

AltStyle によって変換されたページ (->オリジナル) /