[Python-Dev] New and Improved Import Hooks

Martin v. Löwis martin@v.loewis.de
05 Dec 2002 12:34:13 +0100


"M.-A. Lemburg" <mal@lemburg.com> writes:

> You should basically be able to say
> 
> 	sys.path.append('/usr/local/lib/python2.3/std.zip')
> 
> and have the Python std lib at your fingertips. From a user
> POV I don't want to bother about how Python manages to get
> at the stuff inside the ZIP archive.
> 
> Also note that any solution using special objects in sys.path
> is not compatible with the PYTHONPATH environment variable
> (or registry setting). The above approach is...

It appears you haven't studied Just's patch at all. It allows you to
do the sys.path.append, put the zipfile into PYTHONPATH, and *still*
uses special objects on sys.path for zipimports.

Regards,
Martin