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.

asked Oct 20, 2014 at 9:56

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.

answered Oct 21, 2014 at 6:57
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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.