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

Import Modules from Zip Archives

[Python-Dev] PEP 273: Import Modules from Zip ArchivesJames C. Ahlstrom jim@interet.com
Mon, 29 Oct 2001 09:45:08 -0500
Finn Bock wrote:

> >> Would entries in the static python dict be removed when a zipfile is
> >> removed from sys.path?
> >
> >It can be arranged that they are removed at some later point
> >(e.g. when sys.path is next searched).
> 
> An API to do this could be usefull for jython. Right now we depend on
> the GC thread to close the file. Since files are a limited resource it
> would be a good thing to have an explicit way to clean up the cached
> resources.

The static Python dictionary is a memory object which uses no open
file descriptors.  If an element of sys.path contains ".zip" and hasn't
been seen before, the zip archive is opened, searched, and closed.
The key is the name, the value includes the archive name and offset.
Thereafter, the zip archive is never opened unless it contains a needed file.
So I don't think there is a problem.

> myself), I just didn't dare to put such a limit on my jython
> implementation.

I don't understand the jpython implementation, so please point out
all problems so we can fix them now.

JimA



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