Python
11/01 16
除了 Py2exe 之外,还有一些其它的 Python 到 exe 的打包程序,比如 Pyinstallercx_Freeze 等。

Py2exe用法:

第一步:
# mysetup.py
from distutils.core import setup
import py2exe
setup(console=["helloworld.py"])


第二步:
python mysetup.py py2exe


如果指定额外的文件,可以参考:
# mysetup.py
from distutils.core import setup
import glob
import py2exe
setup(console=["helloworld.py"],
      data_files=[("bitmaps",
                   ["bm/large.gif", "bm/small.gif"]),
                  ("fonts",
                   glob.glob("fonts\\*.fnt"))],
)
分页: 1/1 第一页 1 最后页 [ 显示模式: 摘要 | 列表 ]