Calysto / metakernel

Jupyter/IPython Kernel Tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to display html produced by a %%python cell

parmentelat opened this issue · comments

hi there

with plain python notebooks I often use a home-made utility to produce a plan;
my plan() function produces an HTML object, here's how it'd look

image


Now, trying to reproduce something similar from a calipso-bash kernel, I've tried this, but to no avail:

image


this is a nice to have and not a big deal, but is there a way that I can this to work as expected ?

I think it would take some changes to the python magic implementation, but it should in theory be possible to support. I don't have the bandwidth to dive into it currently.

https://github.com/Calysto/metakernel/blob/master/metakernel/magics/python_magic.py

Are you supposed to use special retval variable?

%%python -e
...
retval = display(plan())

Or something to that effect?