How do i just quit out of the python program i.e. end it say when an exception occurs.
stop executing code here / end program / kill program
Comments on this post
I prefer to raise SystemExit instead of sys.exit(), simply because it looks cleaner and is available without importing the sys module.
Note: this can be caught using a try-except block like any other exception.
Hope this helps,
Does raise SystemExit simply exit the program "without any questions"?
Thanks, can someone proxy rep netytan for me?