can't execute pyw on windows

2019-08-09 05:43发布

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条回答
手持菜刀,她持情操
2楼-- · 2019-08-09 06:21

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

查看更多
登录 后发表回答