python cmd下关闭exe程序(关闭浏览器驱动)
import os def close_process( process_name): """Close a process by process name.""" if process_name[-4:].lower() != ".exe": process_name += ".exe" os.system("taskkill /f /im " + process_name) #close_process("geckodriver.exe")