How to exit early?
pinard at iro.umontreal.ca
Mon Aug 12 18:57:50 CEST 2002
[brobbins333 at shaw.ca]
> I want to [...] exit without running the remainder of the script.
> What's the best way to do this?
Suppose you want to exit with status code 13. You may use either:
raise SystemExit, 13
If you want status 0, representing no error, you may prefer to write
François Pinard http://www.iro.umontreal.ca/~pinard
More information about the Python-list