ipython-books / cookbook-code

[DEPRECATED] See the new edition:
http://ipython-books.github.io/
Other
972 stars 457 forks source link

Update custom widgets example #11

Open rossant opened 9 years ago

rossant commented 9 years ago

May need to tweak a few examples with custom widgets in the notebook to make them work with IPython 2.x (see this issue in IPython).

rossant commented 9 years ago

Apparently, to work with IPython 2.x, widget.DOMWidgetView needs to be replaced by IPython.DOMWidgetView, and manager.WidgetManager needs to be replaced by IPython.WidgetManager.

YouGovGit commented 9 years ago

HI, I'm not having any luck getting this to run (using the code I downloaded from the book reference). I'm getting a wrappedError. I think it has something to do with the issue you mention here as this problem sees similar https://gitter.im/ipython/ipython/help/archives/2015/06/02

YouGovGit commented 9 years ago

I think something may have got lost in the update of the code in the book and download. I know you mention it above, but just to be clear, the line: WidgetManager.register_widget_view should read: IPython.WidgetManager.register_widget_view

Otherwise all good. (your book is a revelation so far - well worth the money)

rossant commented 9 years ago

Thanks for the tip! The book's code deserves an update with Jupyter 4.0, especially the widget part. I'm currently busy with the minibook's new edition, so maybe afterwards...!