[Python-Dev] Re: [Zope3-dev] Zip import and sys.path manipulation (was Re: directory hierarchy proposal)

Jack Jansen Jack.Jansen@oratrix.com
Tue, 17 Dec 2002 22:11:40 +0100


On maandag, dec 16, 2002, at 18:47 Europe/Amsterdam, Guido van Rossum 
wrote:
> - Nobody remembers why there is a special case in site.py for lines in
>   the .pth file that start with 'import', except that Martin von
>   Loewis once wanted this.  I propose not to duplicate this
>   functionality in .pkg files.

If you *really* *really* want to prepend an item to sys.path [Jack sits 
quietly to a thundering speech as to why you shouldn't want this, 
studying his fingernails and various other parts of his anatomy] then 
the "import" hack in .pth files is the only way to do it.

And if I want to release a MacPython-OSX that sits on top of 
Apple-supplied /usr/bin/python in MacOSX 10.2 then I really must have a 
way to prepend to sys.path, because there is at least one Mac module 
(macfs) that is braindead in Python 2.2.0.
--
- Jack Jansen        <Jack.Jansen@oratrix.com>        
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma 
Goldman -