Monday, 11 August 2014

How to create a single Windows executable from a Python script

We'll use py2exe for this purpose:

Let's say we have a python script named, and we want to create a single .exe file to run on Windows.

After the installation of the py2exe we create another .py script and run it.
Source code below:

It will create a single windows executable file out of our script.