Calysto / metakernel

Jupyter/IPython Kernel Tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow ipywidgets to work with metakernel magics

joequant opened this issue · comments

I'm working on a root kernel that is based on metakernel. I would like to use python magics to create ipywidgets which can then interface with the metakernel kernel, but it appears that metakernel doesn't have that functionality. Would be interested to see what needs to be done so that ipywidgets work.

That did work at one point I believe. Probably just needs to be updated to match the current ipywidget internals.

Cool. Do you have any suggestion about where to look, and any information about when/what might have broke? I noticed in kernelspy that it's not sending over display_data messages.

I have not tried to use ipywidgets with a metakernel, but I would look at lazy_import_handle_comm_opened. You may also need to add a displayhook to capture the display messages.

There's code in _metakernel.py that dispatches Widgets, but it's not working. Let me see why.

This patch will cause the widgets to display.

_metakernel.py.diff.txt

@joequant Great! Can you make a PR?