[Distutils] zip imports ftw

Daniel Holth dholth at gmail.com
Sun Sep 16 05:19:49 CEST 2012


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?

file.zip:
__main__.py
somedep.py
other/code.py

python file.zip # runs!


More information about the Distutils-SIG mailing list