python end the task code example Example: kill and run process in windows python import os os.system("taskkill /im make.exe")