What does sys.exit(1) means?
Andrew Dalke
dalke at dalkescientific.com
Sun Jun 2 01:53:26 EDT 2002
Ken:
>What does sys.exit(1) means?
It's the same as
raise SystemExit(1)
That is, it raises an exception. See the documentation for more
information about what that means. If nothing else catches the
exception (which may happen accidentally with a blanket 'excect:')
then the top-level interpreter catches that exception, gets the
exit value, quits the main loop, and returns that value (in this
case, the integer '1') as the exit code for the program.
Andrew
dalke at dalkescientific.com
More information about the Python-list
mailing list