2016-03-02 02:19:18
- Download the corresponding version of python py2exe setup and installation, refer to the website
- Complete the process of design debugging python source code to be run as a normal standard
- Write setup.py conversion script follows the example project working directory:
# mysetup.py
from distutils.core import setup
import py2exe
import sys
include = ["encodings","encodings.*"]
sys.argv.append("py2exe")
options = {
"py2exe" : {
"includes" : ["sip"],
"bundle_files" : 3,
},
}
setup(options=options,zipfile=None,console=[{"script" : "test.py","icon_resources" : [(1,"myIcon.ico")]}])
Follow the example parameters marked sense
to run after the completion of the script, you can generate exe files in the directory dist