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/030954.html below:

[Python-Dev] Zip imports, PEP 273, and the .zip extension

[Python-Dev] Zip imports, PEP 273, and the .zip extensionMartin v. Löwis martin@v.loewis.de
07 Dec 2002 18:26:30 +0100
Paul Moore <lists@morpheus.demon.co.uk> writes:

> Any comments?

That's quite expensive. Unless I'm mistaken, it causes an additional
stat call per sys.path item (to find out that it is a directory).

If Just's patch is accepted, you get that feature for free

import zipimport,sys
sys.path.append(zipimport.zipimporter(sys.argv[0]))

does what you want. For Jim's patch, I'd say you lose: We should
tighten the PEP saying that only items in sys.path are treated as
zipfiles that have ".zip" in their name (with a yet-to-be-specified
separator for putting directory in the zipfile into sys.path).

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