[Python-Dev] zipimport to read from a file object instead of just a path? (original) (raw)
martin at v.loewis.de martin at v.loewis.de
Tue May 15 17:14:49 CEST 2012
- Previous message: [Python-Dev] zipimport to read from a file object instead of just a path?
- Next message: [Python-Dev] zipimport to read from a file object instead of just a path?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Zitat von Shy Shalom <shooshx at gmail.com>:
In zipimport.c, function getdata(), the zip file is opened using fopen() and read with CLib functions. Did anyone ever consider making it possible to read the zipped data from a generic file object and not just using a string path?
It's already possible - just write another importer. For the builtin zipimport, this is not an option, since it seeds itself from the sys.path entry, which will be a file name. See PEP 302.
Regards, Martin
- Previous message: [Python-Dev] zipimport to read from a file object instead of just a path?
- Next message: [Python-Dev] zipimport to read from a file object instead of just a path?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]