栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

使用cxFreeze冻结wxPython应用程序时如何隐藏控制台窗口?

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

使用cxFreeze冻结wxPython应用程序时如何隐藏控制台窗口?

这在某种程度上有效,但是存在问题。我的程序在控制台模式和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)])


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/611260.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号