[Python-Dev] zipimport & import hooks (original) (raw)
Kevin Jacobs jacobs@penguin.theopalgroup.com
Fri, 6 Dec 2002 09:32:17 -0500 (EST)
- Previous message: [Python-Dev] zipimport & import hooks
- Next message: [Python-Dev] zipimport & import hooks
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, 6 Dec 2002, Martin v. L=F6wis wrote:
> Hmmm. I haven't looked that closely at Just's proposal. Why should = .tgz or > http://xyz be treated any differently than .zip? =20 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 an= y 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.
Don't like that -- a lazy and incremental replacement method seems much m= ore sensible, and preserves the semantics that non-python-dev-subscribers (an= d I) desire.
-Kevin
-- Kevin Jacobs The OPAL Group - Enterprise Systems Architect Voice: (216) 986-0710 x 19 E-mail: jacobs@theopalgroup.com Fax: (216) 986-0714 WWW: http://www.theopalgroup.com
- Previous message: [Python-Dev] zipimport & import hooks
- Next message: [Python-Dev] zipimport & import hooks
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]