[IPython-User] stop running cell by conditon

Aaron Meurer asmeurer@gmail....
Mon Sep 16 11:49:01 CDT 2013


How are you executing all your cells? For me, "run all cells" stops
immediately as soon as any exception is raised.

Aaron Meurer

On Mon, Sep 16, 2013 at 8:44 AM, Chao YUE <chaoyuejoy@gmail.com> wrote:
> Dear all,
>
> I would like to let the notebook to stop at some cell when some conditions
> are met,
> so that the notebook does not try to execute the following cells. something
> like:
>
> a = 4
> if a !=3:
>     raise SomeError
>
> But I tried both "RuntimeError" and "Stopiteration" as "SomeError" above,
> neither of them works. The following cells are still tried to be executed by
> the notebook.
>
> does anyone have some solution? thanks!
>
> cheers,
>
> Chao
>
> --
> ***********************************************************************************
> Chao YUE
> Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
> UMR 1572 CEA-CNRS-UVSQ
> Batiment 712 - Pe 119
> 91191 GIF Sur YVETTE Cedex
> Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
> ************************************************************************************D
>
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>


More information about the IPython-User mailing list