metakernel icon indicating copy to clipboard operation
metakernel copied to clipboard

how to display html produced by a %%python cell

Open parmentelat opened this issue 5 years ago • 2 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 ?

parmentelat avatar May 17 '19 11:05 parmentelat

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

blink1073 avatar May 18 '19 01:05 blink1073

Are you supposed to use special retval variable?

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

Or something to that effect?

brainysmurf avatar Jul 12 '19 07:07 brainysmurf