[Python-Dev] zipimport & import hooks (original) (raw)
Martin v. L�wis Martin v. L�wis
Fri, 6 Dec 2002 15:26:37 +0100
- Previous message: [Python-Dev] zipimport & import hooks
- Next message: [Python-Dev] zipimport & import hooks
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hmmm. I haven't looked that closely at Just's proposal. Why should .tgz or http://xyz be treated any differently than .zip?
There is a magic, in import.c, which, when an import statement is executed, looks for sys.path entries ending in .zip, and silently replaces them with zipimport objects. No such magic is available for any other form of sys.path entries. So while you can add a urlimport object to sys.path, you lose the hook when you convert the object to a string, as nobody will recreate the hook.
Regards, Martin
- Previous message: [Python-Dev] zipimport & import hooks
- Next message: [Python-Dev] zipimport & import hooks
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]