Re: making it feasible to rely on loaders for reading intra-package data files
Brett Cannon <[email protected]> Sat, 1 Feb 2014 15:37:04 -0500
| Newsgroups | gmane.comp.python.import |
|---|---|
| Message-ID | <CAP1=2W4-Ffh3X0XFdN92cb1D4HLpDwGH8_3VPGewZyKe_FTLBA@mail.gmail.com> |
On Feb 1, 2014 3:15 PM, "Paul Moore" <[email protected]> wrote: > > 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. Yes, if you wanted to try to import from a zip file from within your package (which pex stopped doing for sanity reasons) then yes, you are on your own =) _______________________________________________ Import-SIG mailing list [email protected] https://mail.python.org/mailman/listinfo/import-sig