script?
Is it possible or not in python?
Possible
How ?
Find its procees id and kill
Is it any library for that??
from subprocess import check_call check_call(["pkill", "-9", "-f", filename.py])
I put another script along with this code but it doesn't recognize the filename
U should give filename with its full path for eg if file in D: fpath = D:/filename.py And pass this variable in check_call
https://del.dog/ecramyttar.txt Like this??
I'm getting the pervious error
Are you using Windows?
Why are you using pkill? It's a Linux command
How can I fix it?
How can I replace pkill by windows command in this code?
Why do you want to use pkill?
I want to write a script that stops or runs another script
Is this a homework?
Why you are using Windows?
Not a specific reason
Then don't use Windows. Use Linux
At this moment, I need to fix this and don't have time to change my OS(:
U can even do that with bash script
Обсуждают сегодня