jeudi 16 mai 2019

IPython.display.IFrame is not working with if-statement

I'm trying to get a HTML frame inside Jupyteer Notebook. But the IPython.display.IFrame is not working inside if-statement.

The HTML file is located in the same directory with my "ipynb" file.

When I ran the following code, the String was printed correctly but the IFrame function seemed to be not working.

if True:
    print('123')
    IFrame('plot_data.html', width=700, height=450)

But if I tried

if True:
    print('123')
IFrame('plot_data.html', width=700, height=450)

Both the print and IFrame function produced correct output.

I expect the IFrame function running with some condition control.

Aucun commentaire:

Enregistrer un commentaire