【发布时间】:2013-05-17 09:06:08
【问题描述】:
我正在使用 py2exe 将使用 wxPython 制作的 GUI 应用程序转换为独立的单个 exe 文件。这就是我在 setup.py 中使用的:
from distutils.core import setup
import py2exe
includes = []
excludes = ['_gtkagg', '_tkagg', 'bsddb', 'curses', 'email', 'pywin.debugger',
'pywin.debugger.dbgcon', 'pywin.dialogs', 'tcl',
'Tkconstants', 'Tkinter']
packages = []
dll_excludes = ['libgdk-win32-2.0-0.dll', 'libgobject-2.0-0.dll', 'tcl84.dll',
'tk84.dll']
setup(
options = {"py2exe": {"compressed": True,
"optimize": 2,
"includes": includes,
"excludes": excludes,
"packages": packages,
"dll_excludes": dll_excludes,
"bundle_files": 1,
"dist_dir": "dist",
"skip_archive": False,
"ascii": False,
"custom_boot_script": '',
}
},
zipfile = None,
windows=['script.py']
)
一切顺利,但我面临的问题是 UI 看起来很旧。就像Windows 97的界面什么的。这是图片:
【问题讨论】:
-
直接运行是不是很好看?如果是这样,请尝试删除所有
excludes和dll_excludes(除非您确实需要排除这些),然后看看它是否有任何改变。 -
直接运行看起来不错。删除了所有排除和 dll_excludes 但仍然没有。
标签: python user-interface py2exe