[Distutils] zip imports ftw
Chris Jerdonek
chris.jerdonek at gmail.com
Sun Sep 16 05:44:21 CEST 2012
On Sat, Sep 15, 2012 at 8:19 PM, Daniel Holth <dholth at gmail.com> wrote:
> I'd like to take this moment to note how awesome importing from
> zipfile is. Did you know you can execute a zip file with Python, and
> if it has a __main__.py in the root it will be executed, with the
> zipfile's contents on the PYTHONPATH?
I've known this, but can you say a little about the caveats (e.g. why
you wouldn't always want to store your packages as zip files)? For
example, IIRC you can't really use __file__ from within such modules.
--Chris
More information about the Distutils-SIG
mailing list