[IPython-dev] Get the running cell in javascript.

Marco Halder Marco.Halder@frm2.tum...
Fri Sep 27 06:22:44 CDT 2013


Hello,

I'm experimenting with the javascript of the IPython notebook in  
combination with cell magics.
My Question is how do I get the running cell in javascript?

Using

     var cell = IPython.notebook.get_selected_cell();

gives me the next cell, not the one currently running. A stupid workaround is

     var cell =  
IPython.notebook.get_prev_cell(IPython.notebook.get_selected_cell());

But this is not very robust. If the user changes the selection while  
the cell is executing it breaks. I guess there is a better way. I just  
haven't found it yet.

I guess there is a better way. Any help would be apprecia


More information about the IPython-dev mailing list