How to close a cmd window using python 2.7

前端 未结 5 959
南方客
南方客 2021-01-15 06:03

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         


        
5条回答
  •  误落风尘
    2021-01-15 06:46

    I used this to terminate and close the cmd window, hope it help os.system("taskkill /f /im cmd.exe")

提交回复
热议问题