Re: making it feasible to rely on loaders for reading intra-package data files
Paul Moore <[email protected]> Sat, 1 Feb 2014 20:14:54 +0000
| Newsgroups | gmane.comp.python.import |
|---|---|
| Message-ID | <CACac1F8jGPuXiFnWz_1uL6etjkv1Y7V00DhTwxq3JNSJ2xkxPw@mail.gmail.com> |
On 1 February 2014 19:36, Brett Cannon <[email protected]> wrote: > Not quite sure what you are suggesting as an in-memory zipfile vs. one that > isn't. Any zipfile on sys.path has to be in-memory to read from to do a load > so I don't know where you are drawing the distinction. Normally you put a filesystem path to the zipfile onto sys.path. If I load the zipfile via get_data() it's not got a filesystem path, I have the raw zip data in memory. To import from it I have to write that data to a file and put the filename onto sys.path. Paul.