[IPython-dev] Notebook extensions
Juergen Hasch
python at elbonia.de
Wed Mar 27 16:07:51 EDT 2013
>
> Just FYI, in case it might be of any help,and before I forgot, Codemirror support BreakPoint In gutter.
> http://codemirror.net/demo/marker.html
> If someone is motivated to activate a per line debug once Min's Stdin branch works and is merged...
It looks like the codemirror version included with iPython doesn't support this feature.
>> Here is the extension:
>> https://gist.github.com/juhasch/5241322
>
>
>> There is one question I have: Is it possible to restrict the checkboxes that are generated using CellToolbar.utils.checkbox_ui_generator() to codecells only ?
>
>
> Checkbox UI generator is pretty strait forward, and is just a helper,
> https://github.com/ipython/ipython/blob/master/IPython/frontend/html/notebook/static/js/celltoolbar.js#L322
>
> You can recode it if you want more fine grained logic.
>
> In you case you should be able to simply wrapped the returned function
>
> var helper_breakpoint = CellToolbar.utils.checkbox_ui_generator('Breakpoint',...)
>
> var breakpoint = function(div, cell){
> if ((cell instanceof IPython.CodeCell)) {
> return helper_breakpoint(div,cell)
> } //else do nothing
> }
>
> I didn't test but you get the idea,
>
> Thanks ,keep us informed if it works.
>
Thank you for the hint, this works nicely.
I have updated the extension a little bit and made a short demo:
http://www.youtube.com/watch?v=XXgNUS9gXn0
More information about the IPython-dev
mailing list