A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-December/030906.html below:

[Python-Dev] zipimport & import hooks

[Python-Dev] zipimport & import hooks [Python-Dev] zipimport & import hooksMartin v. Löwis Martin v. Löwis
Fri, 6 Dec 2002 15:26:37 +0100
> 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




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4