The Python Oracle

How do I terminate a script?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Fantascape Looping

--

Chapters
00:00 Question
00:18 Accepted answer (Score 1723)
02:20 Answer 2 (Score 481)
02:43 Answer 3 (Score 148)
02:55 Answer 4 (Score 96)
03:27 Thank you

--

Full question
https://stackoverflow.com/questions/7366...

Accepted answer links:
[sys]: https://docs.python.org/2/library/sys.ht...
[SystemExit]: https://docs.python.org/2/library/except...
[try]: https://docs.python.org/2/reference/comp...
[stderr]: https://docs.python.org/2/library/sys.ht...
[exit()]: https://docs.python.org/2/library/consta...
[glyphtwistedmatrix]: https://stackoverflow.com/questions/7366...

Answer 4 links:
[Stop execution of a script called with execfile]: https://stackoverflow.com/a/1028632/1897...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #termination

#avk47