from distutils.core import setup
import py2exe
setup(
options={
'py2exe': {
'optimize': 2,
'bundle_files': 1,
'compressed': True,
},
},
console=['CreateFileListe.py'],
zipfile=None,
)
上述代码可以将python打包成单个文件,其他关于py2exe,参见http://blog.sina.com.cn/s/blog_8811d2380101azrr.html