keyword that stops further processing of a Python script

Miki Tebeka miki.tebeka at zoran.com
Tue Feb 17 06:26:28 EST 2004


Hello Avi,

>   Does Python provide a token like Perl's __END__
>   that would mark the logical end of a Python script 
>   which could occur before the actual end of the file. 
Just place `raise SystemExit' where you want the script to stop.
Another option of to use triple quotes around the end of the file.

HTH.
Miki



More information about the Python-list mailing list