[IPython-user] Using IPShellEmbed

Frédéric Mantegazza mantegazza@ill...
Mon Mar 19 02:15:32 CDT 2007


Le lundi 19 mars 2007 05:04, Fernando Perez a écrit :

> > I have another question: I execute some code inside IPShellEmbed with
> > IP.runlines() method. Is there a way to catch exceptions and avoid the
> > code to stop? I implemented a custom exception handler, with the
> > IP.set_custom_exc() method, but I don't know how to tell the shell to
> > continue the execution (under some conditions).
> >
> > Is it possible ?
>
> I don't think it is, at least not easily: python doesn't have the
> notion of 'resumable exceptions', so there's nothing at the language
> level that allows an exception handler to restart execution.

Ok, I can live without that ;o)

Thanks.

-- 
   Frédéric


More information about the IPython-user mailing list