About 286,000 results
Open links in new tab
  1. 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 2 and python 3?

  2. Terminating a Python Program - Stack Overflow

    What command do you use in python to terminate a program? i.e. the equivalent of "end" in basic, or "quit" in BASH. I see that "break" takes you out of a loop, and "quit" is all tied up with "cla...

  3. Python exit commands - why so many and when should each be used?

    Nov 3, 2013 · It seems that python supports many different commands to stop script execution. The choices I've found are: quit(), exit(), sys.exit(), os._exit() Have I missed any? What's the difference …

  4. How to properly quit a program in python - Stack Overflow

    Oct 23, 2012 · Im a middle school student, and im starting to learn coding in python. I have been watching video tutorials, but i cant seem to figure out how to make the game quit if you type q. here …

  5. How to stop/terminate a python script from running?

    I wrote a program in IDLE to tokenize text files and it starts to tokeniza 349 text files! How can I stop it? How can I stop a running Python program?

  6. exit - Best way to quit a python programme? - Stack Overflow

    Apr 21, 2018 · Generally, the best way to end a Python program is just to let the code run to completion. For example, a script that looks for "hello" in a file could look like this:

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

    Jan 26, 2010 · The os._exit () version doesn't do this. It just ends the program without doing any cleanup or flushing output buffers, so it shouldn't normally be used. The Python docs indicate that os._exit () …

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

    Is it possible to stop execution of a python script at any line with a command? Like some code quit() # quit at this point some more code (that's not executed)

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

    I need to stop my program when an exception is raised in Python. How do I implement this?

  10. How to exit Python script in Command Prompt? - Stack Overflow

    Jan 8, 2017 · On previous computers, when I would try to exit a Python script on the Windows command prompt, all you need to do is press ctrl+c. But when I do that on my computer it tells me …