[IPython-dev] Back-End implementation of IPython Widget

Cyrille Rossant cyrille.rossant at gmail.com
Tue Nov 18 11:29:42 EST 2014


> I would like to know more about your back-end implementation of your widget, specially using Javascript.
> Indeed when one of your widget is used into the notebook, the Javascript source code doesn't appear into ipynb source.
> But in my implementation I use display(Javascript(myjavascript)) in my back-end file (.py) and consequences are unconvenients because
> each times my .py file is import or executed, the javascript appear directly in the ipynb source.

That might be because built-in widgets use a dedicated widget
architecture, whereas you use the rich display feature which is
different as far as I can tell.

If you want to use the same functionality than built-in widgets,
you'll have to build custom widgets as described here:
http://nbviewer.ipython.org/github/ipython/ipython/blob/master/examples/Interactive%20Widgets/Custom%20Widget%20-%20Hello%20World.ipynb

This tutorial might also be of interest:
https://github.com/rossant/euroscipy2014

Cyrille



More information about the IPython-dev mailing list