Author jvr
Recipients
Date 2002-12-17.22:28:31
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=92689

Fresh patch.
Added zipimporter.get_data(path) method: returns the
(uncompressed) data for a file as a string.

Implemented Wiktor Sadowski's suggestion: a module loaded
with zipimport will have an __importer__ attribute, which is
set to the zipimporter instance that did the load. Possible
quirk: for a package __init__.py file, this is the
zipimporter that handles the directory containing the
package dir, so __importer__.get_data(filename) looks for
filename in that directory, not the package directory. An
__importer__ of an actual submodule *does* look in the
package directory itself.

(Btw. I did this without adding a new
PyImport_ExecCodeModuleEx2 API.)
History
Date User Action Args
2007-08-23 15:18:57adminlinkissue652586 messages
2007-08-23 15:18:57admincreate