0

So I have a python file that runs nonstop. I know I can end it by pressing Control + C but I need to do this using another script.

Is there a script equivalent to pressing Control + C ?

Gilbert Mendoza
  • 405
  • 1
  • 7
  • 16
  • 1
    `Ctrl + C` will send a _signal_ to that process. You can send signals programmatically: [kill(2)](https://linux.die.net/man/2/kill) and [kill(1)](https://linux.die.net/man/1/kill) – try-catch-finally Jul 06 '17 at 05:01
  • Possible duplicate of [How to stop another already running script in python?](https://stackoverflow.com/questions/36676205/how-to-stop-another-already-running-script-in-python) – Bubble Bubble Bubble Gut Jul 06 '17 at 05:02

0 Answers0