Exception - how to ignore it ?

Tyler Eaves tylere at hotpop.com
Tue Jun 3 08:51:49 EDT 2003


Helmut Jarausch wrote:

> Hi,
> 
> is it possible for an exception handler
> to just e.g. print something and set some
> global flags but then to have the script
> continue just after the statement which
> raised the exception?
> 
> Thanks for a hint,
> 
> Helmut Jarausch
> 
> Lehrstuhl fuer Numerische Mathematik
> RWTH - Aachen University
> D 52056 Aachen, Germany

Sure

try:
        a = 4 / 0
except:
        print 'Ooops!'





More information about the Python-list mailing list