[Python-Dev] Computed Goto dispatch for Python 2

Paul Moore p.f.moore at gmail.com
Thu May 28 16:52:56 CEST 2015

On 28 May 2015 at 15:37, Donald Stufft <donald at stufft.io> wrote:
> I think docker is a pretty crummy answer to Go’s static binaries. What I would
> love is for Python to get:
> * The ability to import .so modules via zipzimport (ideally without a temporary
>   directory, but that might require newer APIs from libc and such).
> * The ability to create a “static” Python that links everything it needs into
>   the binary to do a zipimport of everything else (including the stdlib).
> * The ability to execute a zipfile that has been concat onto the end of the
>   Python binary.
> I think that if we get all of that, we could easily create a single file executable
> with real, native support from Python by simply compiling Python in that static
> mode and then appending a zip file containing the standard library and any other
> distributions we need to the end of it.
> We’d probably want some more quality of life improvements around accessing resources
> from within that zip file as well, but that can be done as a library easier than
> the above three things can.

+1. The new embeddable Python distribution for Windows is a great step
forward for this. It's not single-file, but it's easy to produce a
single-directory self-contained application with it. I don't know if
there's anything equivalent for Linux/OSX - maybe it's something we
should look at for them as well (although the whole "static binaries"
concept seems to be fairly frowned on in the Unix world, from what
I've seen).


More information about the Python-Dev mailing list