About 134,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. 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. 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?

  4. Python exit commands - why so many and when should each be …

    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 …

  5. 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 …

  6. 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?

  7. 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. …

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

    Apr 22, 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:

  9. python - How to exit an if clause - Stack Overflow

    What sorts of methods exist for prematurely exiting an if clause? There are times when I'm writing code and want to put a break statement inside of an if clause, only to remember that those can …

  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 …