On Tuesday, September 9, 2014 9:56:04 AM UTC-4, thequie...@gmail.com wrote:

> I wonder if all exceptions throw the exact same non-zero exit code, or 
> whether a specific exit code is assigned to each exception uniquely. Or 
> whether the exit code behavior is undefined (especially since it appears to 
> be undocumented).
> 

Just found sys.excepthook. I see that there is no sys.exit() call in its 
documented behavior: https://docs.python.org/2/library/sys.html


sys.excepthook(type, value, traceback)
This function prints out a given traceback and exception to sys.stderr.

When an exception is raised and uncaught, the interpreter calls sys.excepthook 
with three arguments, the exception class, exception instance, and a traceback 
object. In an interactive session this happens just before control is returned 
to the prompt; in a Python program this happens just before the program exits. 
The handling of such top-level exceptions can be customized by assigning 
another three-argument function to sys.excepthook.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to