[Python-Dev] Add a -z interpreter flag to execute a zip file

Andy C andychup at gmail.com
Wed Jul 11 08:39:01 CEST 2007

I'd like to request comments on this patch I submitted:


There are many details given in the comments on that page.

This can be used to deploy Python programs in a very lightweight and
cross-platform way.  You could imagine a cgi script or a light web app
server being deployed like this.  I have personally deployed Python
programs using zip files and this would get rid of the need for
boilerplate needed for each platform.

The good thing about this is that it's extremely simple -- basically
20 lines of C code to add a -z flag that calls a 3-line Python
function in the runpy module.

I don't believe it overlaps with anything that already exists.  py2exe
and py2app are platform specific and bundle the Python interpreter.
This will be a cross platform binary that doesn't bundle the Python
interpreter.  It doesn't require eggs but I think it would work fine
with eggs, and could help fix a little bug as I mentioned on the patch

Nick Coghlan has reviewed the patch and seems to think it's a good
idea.  Thomas Wouters also said he likes it, and I ran it by Guido
earlier and he seemed to think the idea is good, although I don't
think he has seen the implementation.


More information about the Python-Dev mailing list