[Tutor] Possible to compile python to executable binary?

Alan Gauld alan.gauld@freenet.co.uk
Mon Apr 21 14:58:10 2003


> Hey, I'm just curious: Is it possible to compile *.py scripts to an
> executable binary file?

Yes. There are at least 2 tools, the best known is py2exe.

> Will the machine need python installed for the executable to run?

Yes, but the binary file will include the python interpreter inside
so you don't need to install python separately. OTOH if you distribute
many of these binaries you effectively wind up with multiple copies
of Python on your PC...

Alan G
Author of the Learn to Program web tutor
http://www.freenetpages.co.uk/hp/alan.gauld