[Python-Dev] new import hooks & zip import
James C. Ahlstrom
jim@interet.com
Fri, 13 Dec 2002 13:19:11 -0500
Just van Rossum wrote:
> After incorporating some suggestions and fixes from Paul Moore and Neal Norwitz
> and doing more testing myself, I've decided the importhook/zipimport patch is
> mature enough to post a proper patch:
In PEP 273 under "Booting" the directory /usr/local/lib/python23.zip
(for Unix) or python23.zip in the directory of python23.dll (for
Windows) was added to sys.path so that the Python standard library
could be loaded from a zip archive. This is missing in your patch.
I am not sure whether this was deliberate. But if you want to add
it, it requires patches to site.py, getpath.c, getpathp.c, pythonrun.c,
main.c and sysmodule.c. This moves changes to sys.path out of
sysmodule.c and into getpath[p].c where they belong. You may want to
use my patches for this even if you use your own import.c instead
of mine.
JimA