[Python-Dev] Require loaders set __package__ and __loader__

Nick Coghlan ncoghlan at gmail.com
Sun Apr 15 13:10:53 CEST 2012

On Sun, Apr 15, 2012 at 12:59 PM, Guido van Rossum <guido at python.org> wrote:
> Hm... Can you give an example of a library that needs a real file?
> That sounds like a poorly designed API.

If you're invoking a separate utility (e.g. via it's command line
interface), you may need a real filesystem path that you can pass

>> The get_file() feature has a neat benefit. Since it transparently
>> extracts files from the loader, users can ship binary extensions and
>> shared libraries (dlls) in a ZIP file and use them without too much hassle.
> Yeah, DLLs are about the only example I can think of where even a
> virtual filesystem doesn't help...

An important example, though. However, I still don't believe it is
something we should necessarily be rushing into implementing in the
standard library in the *same* release that finally completes the
conversion started so long ago with PEP 302.


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-Dev mailing list