Newbie Question: Aborting a Python script

Laura Creighton lac at strakt.com
Sat Nov 30 05:05:12 EST 2002


> How do you stop a script during execution?  Do I have to throw an error 
> like a divide by zero?  I didn't see any abort, stop, halt, etc type of 
> function.
> 
> Thanks
> 
> Tom
> -- 
> http://mail.python.org/mailman/listinfo/python-list

You want sys.exit.
See http://www.python.org/doc/current/lib/module-sys.html
Laura Creighton




More information about the Python-list mailing list