sys.exit and exceptions (newbie question)
fredrik at effbot.org
Fri Feb 2 03:10:25 EST 2001
Thomas Wouters wrote:
> You can use sys._exit(). This exits in a very abortive way -- right away,
> dropping everything it's doing, without doing any kind of cleanup.
only if you're not catching AttributeError, that is ;-)
>>> import sys
Traceback (most recent call last):
File "<stdin>", line 1, in ?
(it's "os._exit(code)", not "sys._exit()")
More information about the Python-list