How to display python string as HTML in jupyter notebook

In an IPython laptop, I was able to display a python string containing html as real html using the HTML function from the IPython mapping module.

 from IPython.display import HTML 

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

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

+7
python html ipython jupyter-notebook
source share
1 answer

Use display function

 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

+9
source share

All Articles