[Python-Dev] imputil and modulefinder replacements

Gordon McMillan gmcm@hypernet.com
Mon, 8 Oct 2001 22:26:04 -0400


[Gordon]
> > With Thomas's changes to PyImport_ImportModuleEx, this is
> > largely taken care of (it gets routed through __import__). So
> > with the above bootstrap code, C code will import from my .pyz
> > as well.
[Jim Ahsltrom]
> I am not sure if you are saying that code already exists to
> import from zip archives, or that iu4.py should be used as
> the basis.
>

Neither. I thought you were referring to the Py 1.5-timeframe 
problem of C code using PyImport_ImportModule* and 
bypassing all hooks.

> I think the best approach is for me to write up a PEP based
> on the discussions so far, and let everyone criticize.  The
> proposal is only to import from zip archives, not
> whether to replace imputil.py with iu4.py.

Does "importing from zip archives" really need a PEP? It's 
already quasi-official in that Jython and MacPython implement 
it. The problem it exposes (the fact that the C code makes it 
difficult to do for packages) is certainly a good topic for 
discussion and is part of the reason Greg wrote imputil and I 
wrote iu4.
 


- Gordon