About 401,000 results
Open links in new tab
  1. How to stop/terminate a python script from running?

    To stop a running program, use Ctrl + C to terminate the process. To handle it programmatically in python, import the sys module and use sys.exit() where you want to terminate the program.

  2. python - How do I terminate a script? - Stack Overflow

    also sys.exit () will terminate all python scripts, but quit () only terminates the script which spawned it. David C. Over a year ago Do you know if this command works differently in python …

  3. How do I abort the execution of a Python script? [duplicate]

    Jan 26, 2010 · I have a simple Python script that I want to stop executing if a condition is met. For example:

  4. Programmatically stop execution of python script? [duplicate]

    The Python library reference explicitly states that those functions should only be used in the interactive interpreter and in programs. Doesn't work in scripts. It works at least in the version …

  5. Stopping Python using Ctrl + C - Stack Overflow

    I have a Python script that uses threads and makes lots of HTTP requests. I think, while a HTTP request (using urllib2) is reading, it's blocking and not responding to Ctrl + C to stop the …

  6. How do I stop a program when an exception is raised in Python?

    Jan 13, 2009 · I need to stop my program when an exception is raised in Python. How do I implement this?

  7. Stop python script without killing the python process

    Feb 9, 2015 · I would like to know if there is a way of programatically stopping a python script execution without killing the process like we do with this code: import sys sys.exit() It would be …

  8. How to stop/terminate a python script from running? (once again)

    How to stop/terminate a python script from running? (once again) Asked 5 years, 7 months ago Modified 5 years, 6 months ago Viewed 999 times

  9. how do I halt execution in a python script? - Stack Overflow

    Jul 31, 2010 · Possible Duplicates: Programatically stop execution of python script? Terminating a Python script I want to print a value, and then halt execution of the script. Do I just use return?

  10. How to stop execution of python script in visual studio code?

    May 17, 2018 · However I want to stop the execution of the script so I have tried with Ctrl+C but the program is still running in the integrated terminal of Visual Studio Code.