Reputation: 3977
Is there a way how to import piece of html code from html file to ipynb file?
I would like to have one html file, what will render in multiple ipynb files.
Only information what I found about ipynb imports is: http://nbviewer.ipython.org/github/ipython/ipython/blob/2.x/examples/Notebook/Importing%20Notebooks.ipynb
And it does not make it clearer for me.
Upvotes: 10
Views: 31213
Reputation: 20801
You could simply use the HTML object supplied by IPython like
from IPython.display import HTML
HTML(filename='myhtml.html')
If you don't want the result being an output but rather display it, use the display
method (from IPython.display import display
.
Moreover, you could use an IFrame in the same manner.
Upvotes: 19