Python脚本转可执行程序cx_Freeze

项目主页:http://cx-freeze.sourceforge.net


在Windows下,安装了之后,在需要固化的py脚本旁新建一个setup.py,内容为:

#!/usr/bin/env python
#-*- encoding: utf-8 -*-

import sys
from cx_Freeze import setup, Executable

base = None
if sys.platform == "win32":
    base = "Win32GUI"

setup(
        name = "App Store Speed Up",
        version = "1.0",
        description = "Apple App Store Speed Up Client",
        executables = [Executable("appstore.py",base = base,
                                  icon = "appstore.ico")])


然后在终端中输入:

python setup.py build

实测:无法固化成一个exe文件(py2exe在32位Windows下可以),图标可以实现,并且支持256×256的Vista大图标。

你可能感兴趣的:(资源)