[IPython-dev] Absolute Path IPython

Akim Demaille akim at lrde.epita.fr
Mon Oct 27 06:02:22 EDT 2014

Hi all!

A little ping, especially on the issues I face below when using
HMTL.  Thanks a lot!

Le 16 oct. 2014 à 16:42, Akim Demaille <akim at lrde.epita.fr> a écrit :

> Le 23 sept. 2014 à 14:25, Matthias Bussonnier <bussonniermatthias at gmail.com> a écrit :
>> Hi, 
> Hi Matthias, Hi all,
> The context was: our documentation, written in IPython notebooks
> (see http://nbviewer.ipython.org/urls/www.lrde.epita.fr/dload/vaucanson/2.0/notebooks/index.ipynb), is installed on the user's machine as IPython notebooks.
> I wanted to be able to open these ipynb on request from
> the user so that she could read the documentation inline in her
> working notebook, but it was reported that this won't work, by
> design, for safety reasons.
> You suggested to open a static HTML page instead.
>>> This is possible, indeed.  Which means that we should also install
>>> the html rendering.  Why not, after all.
>> I was referring in using the IPython display machinery to show a ilk to the user, and this link could open another tab. 
>> Yo could even use js to trigger the opening of this tab. 
>> If you look at what Julia is doing, their "info methods" for "objects" do return html with direct link to github source code. 
>> As you know the hash of the current version of the project, you can directly link to a rendered version. Which also avoid to build the doc locally, but I won't go into the debatee of having or not local build of docs. 
>> One thing I can see you doing, is if you can export to html fragments, is having 
>> doc('somehting') just return a IPython.display.HTML object with the content of the doc. 
>> This would allow to see doc in the notebook. 
> Well, I went ahead and now I also install the HTML rendering
> of these notebooks.  However the (outer) notebook goes nut
> when I try to read one of the html I created myself, while
> it seems to be happy with the same file, but served by nbviewer.
> In clear, with:
> from IPython.display import HTML
> HTML("http://nbviewer.ipython.org/urls/www.lrde.epita.fr/dload/vaucanson/2.0/notebooks/index.ipynb")
> my notebook seems to stay alive, while:
> HTML("http://www.lrde.epita.fr/dload/vcsn/2.0/notebooks/index.html")
> completely breaks it (the JS part seems stuck: no means to run a cell
> etc.).  Would you have any idea what is going wrong?
> Of course, I have the same problem when I try to rendering the
> page installed on the user's machine:
> HTML(filename = "/opt/local/share/vcsn/notebooks/index.html")
> Thanks!

More information about the IPython-dev mailing list