can't execute pyw on windows

≡放荡痞女 提交于 2020-01-15 09:35:10

问题


I want to hide the console window of a python program, so I change the file extensions to "pyw", but when I open it, the python IDLE show up even though I choose open it with "pythonw.exe"

If I use "pythonw test.py" in cmd, it works.

So I want to know what's wrong with this and how to solve this, thank you.


回答1:


Change the program that opens python files.

Assuming you're using Windows, right click any python file (in your case any .pyw file, not .py), properties, change Opens with to pythonw instead of IDLE



来源:https://stackoverflow.com/questions/21545667/cant-execute-pyw-on-windows

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!