这在某种程度上有效,但是存在问题。我的程序在控制台模式和GUI模式下运行。当使用
--console参数从控制台运行时,它将在控制台模式下运行。当我按照下面的过程进行 *** 作时,此 *** 作不再起作用,那时我的程序只是一个GUI应用程序。
以下源代码来自中的示例文件
PythonLibsite-packagescx_FreezesamplesPyQt4setup.py。一天的课。阅读自述文件。
# A simple setup script to create an executable using PyQt4. This also# demonstrates the method for creating a Windows executable that does not have# an associated console.## PyQt4app.py is a very simple type of PyQt4 application## Run the build process by running the command 'python setup.py build'## If everything works well you should find a subdirectory in the build# subdirectory that contains the files needed to run the applicationimport sysfrom cx_Freeze import setup, Executablebase = Noneif sys.platform == "win32": base = "Win32GUI"setup( name = "simple_PyQt4", version = "0.1", description = "Sample cx_Freeze PyQt4 script", executables = [Executable("PyQt4app.py", base = base)])
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)