Christoph Zwerschke wrote:
Ian Bicking wrote:

In theory it should work; loading from zips is implemented with ihooks. But it requires that any added ihook defer to existing ihooks, and if it is doing file lookup it needs to use the PEP-specified technique.


Are you refering to PEP 302? As far as I understand, importing from zips is implemented with "new style" hooks which are incompatible with ihooks. See this passage at the end:

"Existing __import__ hooks will not invoke new-style hooks by magic, unless they call the original __import__ function as a fallback. For example, ihooks.py, iu.py and imputil.py are in this sense not forward compatible with this PEP."

Maybe this is the reason why it does not work? Instead of ihooks, should one use the new style hooks of PEP 302? I must admit I don't see through this whole importing mess.

Mmmm... import hooks have scared/scarred me enough that I haven't really looked into the details ;) But what you are saying sounds right.


--
Ian Bicking  /  [EMAIL PROTECTED]  /  http://blog.ianbicking.org


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to