[IPython-dev] Execute python code from the notebook dashboard
Matthias BUSSONNIER
bussonniermatthias at gmail.com
Wed May 7 05:59:46 EDT 2014
Le 3 mai 2014 à 17:00, Clyde Fare a écrit :
> Hi,
>
> I'm trying to create a graphical IPython notebook dashboard that represents a collection of notebooks as a network, where nodes are the notebooks and the links between them are links between notebooks specified in markdown cells.
>
> I've got something that kind of works (https://github.com/Clyde-fare/ipython_graphdash) but it requires manual execution of some python code in the directory that IPython is launched from. I'd like to get rid of this requirement by having this python code execute when people click the refresh notebook list icon on the dashboard.
>
> I'm very much a beginner javascript wise but as far as I can tell when we open a notebook a python kernel is launched but at the dashboard there is no kernel active and so in order to execute some python code I would have to first launch a kernel and then pass it the code I want to run. I think I can probably go away and figure out how to do that but I wanted to check whether this was the right idea, or whether there was a simpler way?
In IPython 2.0 you can access the list of notebook and kernels using the rest API under /api/*
https://localhost:8888/api/notebooks
https://localhost:8888/api/kernels
…
So you can start notebook-less kernel to do whatever you like, and stop it afterward.
You can also get notebook content through this way.
So I would suggest building an alternative dashboard the use this API
--
M
>
> Cheers
>
> Clyde
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140507/3ebe491b/attachment.html>
More information about the IPython-dev
mailing list