简体   繁体   English

如何使Python PyQT程序无法在Windows中打开命令行

[英]How to make a Python PyQT program not open the command line in Windows

I have a Python program that is mostly complete, and there is one thing that I'd like to change, which may or may not be possible. 我有一个Python程序,该程序大部分都已完成,我想更改一件事,这可能会或可能不会。

This program uses PyQT to display a GUI and I have it pretty much pinned up so I was wondering if I can make Python not open up a termianl when I open the program. 该程序使用PyQT来显示GUI,我几乎固定了它,所以我想知道在打开程序时是否可以使Python不打开终端。

I am using Windows XP right now, but the machines it will run on will be Windows 7. I generally work with Linux, so I'm not terribly familiar with Windows. 我现在正在使用Windows XP,但是它将在Windows 7上运行。我通常使用Linux,因此我对Windows并不十分熟悉。

If the terminal has to be there, it's no big deal, but I feel like it's extraneous at this point. 如果航站楼必须在那儿,那没什么大不了的,但是我觉得在这一点上它是多余的。

Thanks! 谢谢!

Use the python extension .pyw. 使用python扩展名.pyw。

Eg program.pyw 例如program.pyw

This causes your program to be run with pythonw.exe instead of python.exe which suppresses the terminal. 这将导致您的程序使用pythonw.exe而不是python.exe运行,从而抑制了终端运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM