Reputation: 5405
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.
Upvotes: 1
Views: 21737
Reputation: 95
For me, I had multiple version of Python installed that was causing issues. Once I had only had one version, I applied that pythonw.exe was the default for .pyw files and it worked.
Upvotes: 0
Reputation: 9001
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
Upvotes: 4