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/2001-October/018199.html below:

[Python-Dev] PEP 273 - inporting from zipfiles

[Python-Dev] PEP 273 - inporting from zipfiles [Python-Dev] PEP 273 - inporting from zipfilesJack Jansen jack@oratrix.nl
Mon, 29 Oct 2001 15:07:14 +0100
Jim,
for your implementation you might want to have a look at the 
Macintosh-specific code in import.c (and possibly at related code in 
Mac/macglue.c, but that's probably less relevant).

MacPython can already have files on sys.path, and there's code to look through 
these files for PYC resources. Don't worry what they are or how it's done, but 
they contain compiled modules.

I got a pretty significant increase of import speed is when I added a cache of 
which sys.path entries were files and which were directories, so for each 
sys.path entry you know that you can skip one leg of the find_module() code. 
This is all in import.c, so you could probably enable it verbatim for zipfile 
imports.

--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.cwi.nl/~jack        | ++++ see http://www.xs4all.nl/~tank/ ++++





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