[SciPy-user] error execption

Fernando Perez scipy-user@scipy.net
Thu, 6 Feb 2003 08:54:12 -0700 (MST)


On Thu, 6 Feb 2003, Agustin Lobo wrote:

> 
> Hi!
> 
> I have a loop within which,
> sometimes, there is an error because a given
> file that is suppossed to be read is not present.
> In this case python issues an error message
> and stops. Is there any way I could
> get the error message but
> get the process continue with the next
> element in the list?

You need to learn how to handle exceptions, which are described here:

http://www.python.org/doc/current/tut/node10.html

and here:

http://www.python.org/doc/current/ref/try.html

You'll find a raft of tutorials at:

http://www.python.org/doc/Newbies.html


Cheers,

f.