[Tutor] exit message
eryksun
eryksun at gmail.com
Mon May 6 09:21:29 CEST 2013
On Mon, May 6, 2013 at 1:12 AM, Zachary Ware
<zachary.ware+pytut at gmail.com> wrote:
> If you don't care about the exit code, you can just "drop off" the end
> of the script. If you don't end with an unhandled exception, your
> exit code will be 0, otherwise it will (probably) be 1.
You can also exit with a message and an exit code set to 1:
>>> raise SystemExit('Red Alert!')
Red Alert!
C:\>echo %errorlevel%
1
More information about the Tutor
mailing list