samedi 21 février 2015

Displaying an HTML file with a JS inside an iPython notebook


I have a piece of code in an iPython notebook that programmatically generates a folder named 'sound' containing the following files: index.html, canvas.js, graph.js and style.css.


If I open index.html in my browser, I can see exactly the output I want: a graph with a nice JS animation representing vectors in and out of a process I am modeling.


network visualization


However, I would like to display the HTML file from inside the iPython notebook itself.


For that, I type the following code:



from IPython.display import IFrame
IFrame('/Users/useird/Desktop/sound/index.html', width=700, height=350)


Which returns the following: 404 error ipython notebook


I am not an expert with css or js, but I think that iPython can display js inside an iframe, so what's wrong here?


Thanks





Aucun commentaire:

Enregistrer un commentaire