kill process in python linux code example
Example 1: linux kill python
ps -elf | grep python
kill -9 <whatever_the_PID_is>
Example 2: kill and run process in windows python
import os
os.system("taskkill /im make.exe")
ps -elf | grep python
kill -9 <whatever_the_PID_is>
import os
os.system("taskkill /im make.exe")