I'm trying to end a subprocess that I've opened in a new window with:
alarm = subprocess.Popen(['lxterminal', '-e', 'python alarm.py'])
I'm trying to get it so that when a certain command is received. It ends execution of the script by closing the window.
I've tried the .kill
command as well as many others, but nothing seems to work.
Edit: Additional code:
if (push.body == 'Alarm Test'):
alarm = subprocess.Popen(['python', 'alarm.py'])
if (push.body == 'Alarm End'):
alarm.kill()