[Python-Dev] New and Improved Import Hooks

Samuele Pedroni pedronis@bluewin.ch
Tue, 3 Dec 2002 20:28:41 +0100


From: "Guido van Rossum" <guido@python.org>
> > >1. Your import hooks seem to act at a level "above" sys.path,
> > >   in the sense that the normal sys.path search becomes just
> > >   another hook. With that in mind, I don't see a way for a user
> > >   to add a zipfile in the *middle* of sys.path.
> >
> > It is worth to notice that Jython 2.1 already implement more or less
> > PEP 273 approach, allowing to add zipfiles to sys.path.
>
> I'd be disappointed if adding zipfiles to sys.path wasn't possible.
> After all that's what PEP 273 says.

but - if I understand correctly - given the approach taken by the import_hooks
patch
there's the issue:

consider all directories then all zipfiles

versus consider both kind of import sources according to the order in sys.path,
which is the most natural extension.

regards.