[IPython-dev] Kernel-independent magics?

Doug Blank doug.blank at gmail.com
Tue Aug 12 13:09:58 EDT 2014

We are beginning to take our Pure-Python languages out from Calico and
implement them as stand-alone kernels (based on KernelBase) for Jupyter
(IPython 3). This includes Scheme, Basic, Logo, Little Computer (LC3,
assembly language), etc.

Wondering about how magics might be handled in Jupyter (In the Calico
Kernel, we handle magics in C# before passing the rest of the code to the
language). Currently, it looks like magics are handled in IPython by the
Interactive Python Shell. There are many magics that are language
independent and could be handled more abstractly (via JavaScript or server):

* %%latex
* %%html
* %connect_info
* %%file - create a file, with cell contents
* %%time - give execution time (not timeit, which figures out how many
times to run)
* %logstart
* many others

In addition, there is the need to allow others to write magics for specific
kernels, or for general kernels. That would imply some kind of %load_ext.

Also, there is generic ! shell execution.

Are there any plans on how to handle these functions in a
kernel-independent manner? If not, it would be good for kernel authors to
adopt some standards for magics.

Thanks for any pointers or comments!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140812/d37877ec/attachment.html>

More information about the IPython-dev mailing list