how do I exit gracefully?

Moshe Zadka moshez at math.huji.ac.il
Sun Oct 29 16:32:48 EST 2000


On Sat, 28 Oct 2000, Thomas A. Bryan wrote:

> Andrew Pierce wrote:
> 
> > execute?  I dug around the FAQ and DejaNews and found sys.exit() and
> > os._exit() but both of these methods raise exceptions.  
> 
> sys.exit() should exit the program, not raise an exception.

os._exit() does not raise an exception
sys.exit() does raise an exception, as otherwise finally: blocks would
not execute properly.

--
Moshe Zadka <moshez at math.huji.ac.il> -- 95855124
http://advogato.org/person/moshez





More information about the Python-list mailing list