Quantcast

where is the code to generate IPython Notebook URL for a new .ipynb file

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

where is the code to generate IPython Notebook URL for a new .ipynb file

W Gong
Hi, 
I am new and like to know which file has the code to generate IPython Notebook URL for a new .ipynb file.

For example, I start notebook in a folder "c:\ipython",
as soon as a new "test.ipynb" file is dropped into that folder, 
the dashboard shows the "test.ipynb" file and generates an URL like
http://127.0.0.1:8888/519307ea-7f69-4add-95a4-17cfe6ef101a

I like to know whether a dict exists between the filename "test.ipynb" and the URL string.

Thanks,
Wen







_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: where is the code to generate IPython Notebook URL for a new .ipynb file

Matthias Bussonnier

Le 23 nov. 2012 à 01:41, W Gong a écrit :

> Hi,
> I am new and like to know which file has the code to generate IPython Notebook URL for a new .ipynb file.
>
> For example, I start notebook in a folder "c:\ipython",
> as soon as a new "test.ipynb" file is dropped into that folder,
> the dashboard shows the "test.ipynb" file and generates an URL like
> http://127.0.0.1:8888/519307ea-7f69-4add-95a4-17cfe6ef101a
>
> I like to know whether a dict exists between the filename "test.ipynb" and the URL string.

Hi,

The regex for URL is defined here :
IPython/frontend/html/notebook/notebookapp.py     L144

And the dict cam from FileNotebookManager (filenbmanager.py) L49.

You can also access it via the http://127.0.0.1:8888/notebooks url.

Hope that's help.
Tell us if you need more explanation on what does what.

--
Matthias


>
> Thanks,
> Wen
>
>
>
>
>
>
> _______________________________________________
> IPython-dev mailing list
> [hidden email]
> http://mail.scipy.org/mailman/listinfo/ipython-dev

_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev
Loading...