首页 > 编程知识 正文

bat运行最小化cmd窗口(matlab关闭窗口命令)

时间:2023-05-06 17:32:09 阅读:69996 作者:1665

小典典

这在某种程度上有效,但有问题。 我的程序在控制台模式和GUI模式下运行。 使用--console参数从控制台运行时,将在控制台模式下运行。 如果按照以下步骤操作,此操作将不起作用。 当时,我的程序只是一个GUI APP应用程序。

以下源代码显示的示例文件PythonLibsite-

包 CX _ freezesamplespyqt4 setup.py。 一天的课。 阅读自述文件。

# asimplesetupscripttocreateanexecutableusingpyqt4. this also

# demonstratesthemethodforcreatingawindowsexecutablethatdoesnothave

# an关联控制台。

#

# pyqt 4a PP.pyisaverysimpletypeofpyqt4application

#

# runthebuildprocessbyrunningthecommand ' python setup.py build '

#

# ifeverythingworkswellyoushouldfindasubdirectoryinthebuild

# subdirectorythatcontainsthefilesneededtoruntheapplication

导入系统

from cx_Freeze import setup,Executable

base=None

if sys.platform=='win32':

base='Win32GUI '

设置(

name='simple_PyQt4',

版本=' 0.1 ',

description=' sample CX _ freeze pyqt 4脚本',

executables=[ executable (' pyqt 4a PP.py ',base=base ) ]

2020-12-20

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。