<div dir="ltr">Thanks,<div>I could do that, but it seems a bit out of place in the IPython widget framework.  </div><div><br></div><div>Imagine if cells had a hidden attribute that could be set in python.  Then you could use the widget framework to implement a slideshow, or select which type of report to show.  Being able to only access those apis through javascript raises the bar for use.</div>
<div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 7, 2014 at 12:33 PM, Andrew Payne <span dir="ltr"><<a href="mailto:andy@payne.org" target="_blank">andy@payne.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote"><div class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div dir="ltr"><div><font color="#0000ff">I don't see a way via python to cause the current kernel to execute the rest of the cells in the notebook.  I could hack something together with javascript, but that seems problematic and brittle.  </font><br>

</div></div></blockquote><div><br></div></div><div>There are a number of existing Javascript  methods for executing cells, including <font face="courier new, monospace">execute_cell_range(start, end)</font> and <font face="courier new, monospace">execute_all_cells()</font>.  </div>

<div><br></div><div>See:  <a href="https://github.com/ipython/ipython/blob/6ecbe721af987d743b7bfcec0448e4edace5f812/IPython/html/static/notebook/js/notebook.js#L1685" target="_blank">https://github.com/ipython/ipython/blob/6ecbe721af987d743b7bfcec0448e4edace5f812/IPython/html/static/notebook/js/notebook.js#L1685</a></div>

<div><br></div><div>And this notebook includes a simple example of adding keyboard shortcut using this method.  See:  <a href="http://nbviewer.ipython.org/github/minrk/pydata-sv-14/blob/master/What's%20New.ipynb" target="_blank">http://nbviewer.ipython.org/github/minrk/pydata-sv-14/blob/master/What's%20New.ipynb</a></div>

<div><br></div><div>It's easy to generalize that to a Javascript button.</div><div><br></div><div>-andy</div><div><br></div></div></div></div>
<br>_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></blockquote></div><br></div>