[Python-Dev] Single-file Python executables (was: Computed Goto dispatch for Python 2) (original) (raw)

Steve Dower Steve.Dower at microsoft.com
Thu May 28 17:30:33 CEST 2015


Donald Stufft wrote:

Well Python 3.4.3 binary is 4kb for me, so you'd have that + your 1KB Python script + whatever other pieces you need.

For contrast, here are the things you need on Windows to be able to get to an interactive prompt (I don't know how other platforms get this down to 4KB...):

This gets you to ">>>", and basically everything after that is going to fail for some reason. That's an unavoidable 4,257KB.

The rest of the stdlib adds another ~16MB once you exclude the test suite, so a fully functioning Python is not cheap. (Using compressed .pyc's in a zip file can make a big difference here though, assuming you're willing to trade CPU for HDD.)

Cheers, Steve


More information about the Python-Dev mailing list