[IPython-User] stop running cell by conditon

Chao YUE chaoyuejoy@gmail....
Mon Sep 16 09:44:02 CDT 2013


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20130916/7da9981e/attachment.html 


More information about the IPython-User mailing list