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

[Python-Dev] Zipping Zope3

[Python-Dev] Zipping Zope3 [Python-Dev] Zipping Zope3Moore, Paul Paul.Moore@atosorigin.com
Thu, 19 Dec 2002 09:22:37 -0000
From: Just van Rossum [mailto:just@letterror.com]
> Btw. what you want is _possible_ with the current zipimporter
> object: there's zi.get_data(filename), and you can inspect the
> "files" attribute (a dict mapping filenames to index info; it's
> an internal attribute, so I might rename it to _files).

Just to clarify this point: you can subclass the existing
zipimport.zipimporter class and add any extra methods you want.
Then, by replacing zipimporter in sys.path_hooks with your
subclass, you transparently get your extra functionality.

I'm not saying that this is the ultimate solution, but it gives
us an opportunity to experiment before committing to a specific
implementation in the core.

Paul.



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