隐藏使用PyInstaller创建的.exe文件的控制台 [英] Hide the console of an .exe file created with PyInstaller

查看:230
本文介绍了隐藏使用PyInstaller创建的.exe文件的控制台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使我的程序可执行. 我使用TkInter编写GUI,并且在某处阅读到必须在执行程序时将文件另存为.pyw才能隐藏控制台. 问题在于,即使将其转换为.pyw,使用PyInstaller将其设为可执行文件后,控制台也会再次显示. 我如何也将控制台隐藏在.exe文件中?

I want to make my program executable. I used TkInter to write the GUI, and I read somewhere that you have to save your file as .pyw to hide the console when the program is executed. The problem is that after making it an executable with PyInstaller, the console shows up again, even though the file converted was .pyw. How can I hide the console also in the .exe file?

推荐答案

您是否尝试了--windowed命令行标志?

Did you try --windowed command line flag ?

这篇关于隐藏使用PyInstaller创建的.exe文件的控制台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆