Allow IFrame page refresh within Jupyter Notebooks

Viewed 16

Suppose you have a page test.html, where a python function f is writing content.

I would like to display the work in progress in a Jupyter Notebook without hosting the page on a web server but simply using it as a local file for simplicity's sake.


from IPython.display import IFrame, display

display(IFrame(
    src="simple_test.html",
    width="100%",
    height="auto"
))

f()

where the page test.html is refreshed using <meta http-equiv="refresh" content="1" > as such:

<html>
    <head>
        <meta http-equiv="refresh" content="1" >
    </head>
    <body>
        content being updated
    </body>
</html>

The refresh in a Jupyter Notebook leads to a page such as the following being displayed:

enter image description here

0 Answers
Related