[Python-Dev] zipimport to read from a file object instead of just a path? (original) (raw)
Shy Shalom shooshx at gmail.com
Tue May 15 19:21:32 CEST 2012
- Previous message: [Python-Dev] zipimport to read from a file object instead of just a path?
- Next message: [Python-Dev] Accepting PEP 3144 (the ipaddress library)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
Maybe it can be seeded by both a string path or a file object, the same way zipfile.ZipFile does. This way I'll be able to somehow override or re-initialize zipimport with my own StringIO
- Shy
- Previous message: [Python-Dev] zipimport to read from a file object instead of just a path?
- Next message: [Python-Dev] Accepting PEP 3144 (the ipaddress library)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]