<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <font size="+1">Hi all,<br>
      <br>
      I would like to raise a question about running multiple notebook
      cells. At the moment, there is an option for "running all below",
      which seems to collect all input cells, submit it to the server,
      and then wait for the results. However, if there is an unattended
      to error in one of the cells, then this <br>
      sequence immediately breaks, and the remaining cells don't
      execute. <br>
      <br>
      I would like to suggest that there be an option for running all
      cells truly sequentially, meaning that the notebook should submit
      cell [N] only when the server returned from cell [N-1]. <br>
      <br>
      I would see at least three advantages. One is that the
      above-mentioned issue could be avoided (of course, this particular
      case could be solved by wrapping each cell in a try/catch loop on
      the client side). The other is that this would allow one to
      sequentially programme the content of the input cells. What I
      meant is something like this (pseudo-code)<br>
      <br>
      In [1]:  i = 0<br>
                  ip = get_ipython()<br>
    </font>            def set_input(i):<br>
                    if i < 10:<br>
    <font size="+1"><font size="+1">                   
        ip.set_next_input('i += 1\nset_input(i)')</font><br>
      <br>
      In [2]:     i += 1<br>
                     set_input(i)<br>
      <br>
      and when the user hits "run all below" on In [2], i would be
      incremented 9 times, and placed in successive input cells, each
      executed in turn. <br>
      Finally, if cells were collected and executed one-by-one, it would
      be possible to "supervise" the running of a longer calculation
      without having to interrupt the server: parameters could be
      tweaked or enquired about by simply inserting a cell in the
      notebook. Being able to get intermediate results on demand I would
      find quite useful.<br>
      <br>
      I should also point out that this issue is related to a question
      that was posted here a couple of weeks ago
      <a class="moz-txt-link-freetext" href="http://mail.scipy.org/pipermail/ipython-dev/2014-March/013601.html">http://mail.scipy.org/pipermail/ipython-dev/2014-March/013601.html</a><br>
      <br>
      I don't know what kind of architectural problems might arise from
      this scheme, but I really don't see any stumbling blocks. I don't
      advocate modifying anything in the core, and I believe, this could
      be done with minimal effort (I would be more than happy to
      contribute, if the scheme is viable) on the client side. Perhaps,
      some of the developers could comment. <br>
      <br>
      Cheers,<br>
      Zoltán<br>
    </font>
  </body>
</html>