I don't get why sys.exit(1) doesn't exit the while loop in the follow case

Steven D'Aprano steve-REMOVE-THIS at cybersource.com.au
Tue Oct 5 09:41:12 CEST 2010

On Tue, 05 Oct 2010 11:13:53 +0800, Von wrote:

> Try to use sys.exit(0)
> Maybe you should print out the error in your except block.

Not exiting with a status-code of 0 is no more helpful than not exiting 
with a status-code of 1.

It's actually *less* helpful, if the intention is actually to exit with a 
non-zero exit status.


More information about the Python-list mailing list