py2exe
py2exe is a tool which turns .py to .exe (on Windows platform)
-
Install py2exe at http://sourceforge.net/projects/py2exe/.
-
Write a setup script for the specific python file. For example, if we want to turn
helloworld.py
intohelloworld.exe
, then we write asetup.py
as follows:from distutils.core import setup import py2exe setup(console=['helloworld.py'])
-
Run the following command:
python setup.py py2exe
The generated file for distribution will be in the folder
dist
.