setup.py:python
from distutils.core import setupspa
import py2exeip
setup(console=['test_exe.py'])input
test_exe.py文件console
print("Python script to exe test program")test
count = 0
import
while count <10:im
print("count = " + str(count) +"\n")di
count = count + 1文件
input()
執行python setpu.py py2exe就能夠生成一個dist文件,裏面有exe文件了