i need to stop a specific process(in the script that included) on command that is running in the background on my raspberry pi using python...what code should i use?
i tried different os commands but it didn't worked
path = "/home/pi/Desktop/fm_transmitter-master/"
os.chdir(path)
args = ["sudo", "python", "PiStation.py", "-f", "96", "song.mp3"]
pi_station = subprocess.Popen(args, stdout=subprocess.PIPE
i need to stop this procces on command using python code