Use py2exe compile python file into exe file(用py2exe把python文件编译成exe文件)

来源:互联网 发布:济南百度快照优化 编辑:程序博客网 时间:2024/05/19 22:03

用py2exe把python文件编译成exe文件


first: Create a new python file(Please pledge the python version suit the py2exe version) 

(Py2exe download address:http://sourceforge.net/projects/py2exe/files/py2exe)

(if having no access to the download address, please use my temp address:  http://pan.baidu.com/s/1CFbz9)

# mysetup.pyfrom distutils.core import setupimport py2exesetup(console=["perWlan.py"])

Tips: perWlan.py is the filename you want to translate into exe file.



Second: Enter the discovery the same as the file mysetup.py

Use cmd python shell command:

>>python mysetup.py py2exe