[Python-Dev] New and Improved Import Hooks
Samuele Pedroni
pedronis@bluewin.ch
Tue, 3 Dec 2002 21:03:13 +0100
From: "Just van Rossum" <just@letterror.com>
> I will change my zipimport hook (which _still_ isn't finished ;-) to also
> traverse sys.path, and check for *.zip path endings.
>
my point was that, given
dir1;zip0;dir2
dir1 should take over zip0 that should take over dir2.
[This is what Jython 2.1 does btw]
If the resulting import precedence order is that both dir1 and dir2 take over
zip0, then maybe allowing zip0 in sys.path is just confusing,
and zipfiles should be specified elsewhere.
In general I clearly see that there can be import hooks that can leverage
sys.path and its order semantics and some that can't.
regards.