The title pretty much says it, although it does not need to be specific to a cmd, just closing an application in general. I have seen
os.system(taskkill blah blah)
this does not actually close the windows but rather just ends the cmd inside the window, I would like to actually close the window itself.
EDIT: Could someone please give me a specific line of code that would close a cmd window. The name of the cmd window when moused over is
C:\Windows\system32\cmd.exe
something like this?
import sys
sys.exit()
or easier ...
raise SystemExit
if that's not what your looking for tell me
also you can just save the file with a .pyw and that doesn't open the cmd at all
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With