10

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.

1 Answer 1

19

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.