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 bla
I used this to terminate and close the cmd window, hope it help os.system("taskkill /f /im cmd.exe")