[IPython-dev] Absolute Path IPython

Akim Demaille akim at lrde.epita.fr
Tue Sep 23 07:50:32 EDT 2014


Le 23 sept. 2014 à 11:41, Matthias Bussonnier <bussonniermatthias at gmail.com> a écrit :

> Hi lucien, 

Hi Matthias,

Thanks for the answer.

> Thanks for the explanation, I better understand what you want to do. 
> You are trying do build something under some assumption that are wrong and cannot reliably always work.

Yes, we know :)  That's why we are looking for The Better Way.

> Let assume the following: 
> 
> 	- I am on  my laptop (it does not have python installed)
> 	- the IPython notebook server is on my Desktop with an open port on the internet. 
> 	- My kernel were my code runs in on my lab cluster. 
> 
> Webbrower.open(url) is runned on the cluster, though the ipynb files are obviously on my desktop, and what you want is open a page on your laptop. So this cannot reliably work. It needs you to get information on the network architecture you might not have. 

This is not right, the notebooks we are referring to here
are where the server is.  Our application, Vaucanson, is
a Python binding of a C++ library.  "make install" installs
not only the shared libs and Python modules, but also a
collection of notebooks (some of them can be looked at here:

https://www.lrde.epita.fr/dload//vaucanson/2.0/notebooks/algos/

Here they are available both as notebooks, and html.  Unfortunately
on occasion the Mathjax rendering is broken, but I have read
somewhere this is known, and fixed in the repo (for instance
https://www.lrde.epita.fr/dload/vaucanson/2.0/notebooks/algos/automaton.reduce.html)

I agree though that our use case is not taking the full
generality of what IPython can do.

> That beeing said. You might be able to workaround by :
> 
> 	- display html instead of trying web browser open 

This is possible, indeed.  Which means that we should also install
the html rendering.  Why not, after all.

> 	- avoid absolute url, use '/notebook/<path>'

yes we need to address the scenario where the user fired the
notebook from /home/foo, yet the documentation is in /usr/local.

> 	- have a look at nbopen[1] that does what you ask in **some** cases
> 	
> You cannot get around the fact that you cannot access ../ url thing. It is a question of **security**.

We understand that.  However, since the user launches the
notebook via a wrapper of ours, we would be happy if there
were a means, from the command line or elsewhere, to pre-approve
some other paths.

> You project of having ipynb as documentation is interesting, we would be glad to see how you did it, and how it feels for users.

Currently it feels bad, as it is not interactive: the user
has to open the documentation page but hand, and then click.
It's precisely to make her life easier that we are trying
to have some thing like "?"/"??", but which would open these
pages.  Inline rendering of HTML would also be ok actually.


Thanks again!


More information about the IPython-dev mailing list