[Tutor] Halting execution

Hugo González Monteverde hugonz-lists at h-lab.net
Wed May 3 21:04:44 CEST 2006


It would be similar to Perl's die() commmand. But no, in Python the 
argument is the error status of your script.

You'd have to do something like

def exitnow(arg):
     print arg
     #maybe sys has not been imported
     import sys
     sys.exit(1)

Hugo

Ertl, John wrote:
> Matthew,
> 
> Not sure if ipython is different but have you tried sys.exit("stoping now")
> 


More information about the Tutor mailing list