[Python-Dev] New and Improved Import Hooks

M.-A. Lemburg mal@lemburg.com
Thu, 05 Dec 2002 12:40:51 +0100


Martin v. L=F6wis wrote:
> "M.-A. Lemburg" <mal@lemburg.com> writes:
>=20
>=20
>>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...
>=20
>=20
> It appears you haven't studied Just's patch at all.=20

That's right; I didn't have time to take a look.

> It allows you to
> do the sys.path.append, put the zipfile into PYTHONPATH,=20

Nice and thanks for the clarification.

> and *still* uses special objects on sys.path for zipimports.

But why store the import objects in sys.path and not in
some auxilliary dictionary instead ?

--=20
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
_______________________________________________________________________
eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,...
Python Consulting:                               http://www.egenix.com/
Python Software:                    http://www.egenix.com/files/python/