1) install py2exe
2)
教程:
自我编程:
aim file: new.py
print "hello,world."
raw_input('')# in order to make the window to show more time
convert file: mysetup.py
from distutils.core import setup
import py2exe
setup(console=["new.py"]) #this is the aim file
命令行:
python mysetup.py py2exe
结果:
1)命令行:
,忽略以上警告
2) 文件夹:
双击new.exe即可出现想要的效果。