[Python-Dev] zipfiles on sys.path

Gordon McMillan gmcm@hypernet.com
Mon, 30 Jul 2001 18:40:21 -0400


Finn Bock wrote:
> 
> We have recently added support for .zip files on sys.path to
> Jython. Now, after the fact, I wondered what prior art exists for
> such a feature and the semantic that is used. We came up with a
> solution where:

Prior art should include imputil.py (especially since it's at 
least partly blessed).

With imputil, an importer object is on sys.path. The default 
implementation will give you a __path__ consisting of the 
package name (I think), but you're free to override that in an 
importer subclass.

I believe Thomas Heller uses zipfiles with imputil in py2exe. I 
use archives (3 different formats), but not zipfiles.
 



- Gordon