ipython/ipython — pull request #5140 by ivanov (2014-02-18 06:08:27+00:00)
Title: WIP: %kernels magic

@fperez requested this, and here's a functional version of it.

This PR adds a `%kernels` magic, which returns a list of notebooks which have an active kernel, and adds a shutdown button for it, just like on the dashboard's Notebooks tab. The difference is that this will show *all* notebooks with an active kernel, not just the ones in the current subdirectory, and it will list the entire (served) path for the notebook.

Features:
- [x] list of active notebooks updated when shutting down a kernel.
- [x] above actually updates all results of %kernels magic for this notebook
- [x] link to the current notebook is inactive
- [x] allow manual update (in case

TODO:
- [ ] sane representation in console
- [ ] `%kernels kill ` (not yet implemented)

optional:
- [ ] refactor NotebookList so we can add an Active Kernels dashboard tab (depending on feedback)
- [ ] window blur and focus autorefresh (like the dashboard view)

(I'll upload a screenshot shortly)