Blocking the execution of a script

Peter van Kampen news at woody.datatailors.com
Fri Aug 13 07:49:45 EDT 2004


In article <mailman.1606.1092393719.5135.python-list at python.org>, Angelo Secchi wrote:
>
> Hi,
> I would like Python to interrupt the execution of a script in case an if
> condition turns out to be TRUE. What is the proper way to do that?
> 
> Thanks,
> a. 

import sys

if cond:
   sys.exit(1)


Hth,

PterK

-- 
Peter van Kampen
pterk -- at -- datatailors.com



More information about the Python-list mailing list