[Pythonmac-SIG] sys.path for MacPython 2.3 - next set of questions
Jack Jansen
Jack.Jansen@cwi.nl
Wed, 16 Apr 2003 11:34:21 +0200
On Wednesday, Apr 16, 2003, at 01:05 Europe/Amsterdam, Just van Rossum
wrote:
> Chris Barker wrote:
>
>> Just van Rossum wrote:
>>>> Turns out it doesn't matter: site.py will remove it if it doesn't
>>>> exist.
>>>
>>> Not anymore in 2.3.
>>
>> So what does 2.3 do with directories on PYTHONPATH that don't exist?
>
> Nothing, it leaves them in. The idea is that there may be importer
> objects on sys.path_hooks that can handle them (see PEP 302).
This may be true for items from PYTHONPATH, but not for site-packages.
The code says
for sitedir in sitedirs:
if os.path.isdir(sitedir):
addsitedir(sitedir)
--
Jack Jansen, <Jack.Jansen@cwi.nl>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma
Goldman