22

In IPython notebook, I used to be able to display a python string that contains html as actual html, by using the HTML function from IPython's display module.

from IPython.display import HTML

In jupyter notebook the display module no longer exists. Does anyone know where I can find the HTML function?

I use Jupyter notebook 4.1, IPython 4.0.2 and Python 3.5.1 64 bit

Thomas K
  • 37,597
  • 7
  • 80
  • 84
jkokorian
  • 2,645
  • 5
  • 29
  • 46

1 Answers1

25

Use the function display

def bar():
    from IPython.display import display, HTML
    chart = HTML('<h1>Hello, world!</h1>')
    # or chart = charts.plot(...)
    display(chart)

bar()

source: http://suanfazu.com/t/jupyter-highcharts/13438/2

Greenstick
  • 7,829
  • 1
  • 22
  • 28
jona
  • 279
  • 2
  • 8