Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to close a .pyw manually

Tags:

python

I have a python program that will never exit automatically. However, it does need to do so at some point. It must run without the console, so I saved it as a .pyw, but this means there is no X to click on to close it. How do I close this manually without restarting the machine? I am on Windows, in case it needs the command line.

like image 369
reemer9997 Avatar asked Oct 28 '25 08:10

reemer9997


1 Answers

You could just do taskkill /IM pythonw.exe /F if you have only one pythonw running. Type this into a terminal or create a link on the desktop or wherever you want.