我需要将Python脚本转换为Windows可执行文件。如何将python脚本编译为二进制可执行文件
我的Python 2.6安装到python26
。
我已经创建了一个脚本,并保持它在C:\pythonscript
。此文件夹中有两个文件
Setup.py
和oldlogs.py
(该文件需要丁文)
setup.py
代码
from distutils.core import setup
import py2exe
setup(console=['oldlogs.py'])
我怎么能转换oldlogs.py到一个exe文件?
看到它的[教程](HTTP采集过程://www.py2exe .org/index.cgi/Tutorial) –
[如何使Python脚本独立可执行文件无需任何依赖性运行](http://stackoverflow.com/questions/5458048/how-to-make-a- python-script-standalone-executable-to-run-without-any-dependency) –