[IPython-dev] integrating with Cadabra computer algebra system

Kasper Peeters kasper.peeters at phi-sci.com
Mon Nov 25 13:50:13 EST 2013


I am the author of Cadabra, an open source computer algebra system for
tensor computations in field theory,


This system currently has its own notebook-based GUI and its own
(restricted) programming language. I am considering switching the
language to Python, and also thinking of using IPython for the GUI, to
take some of the load off my shoulders.

However, I would like the notebook interface to retain the capability of
accepting pure Cadabra expressions into an input cell, and have those
evaluated using Cadabra rather than Python. I know IPython has the
ability to evaluate input cells which contain e.g. R code, but that
always seems to require a magic '%' bit at the beginning of a cell.

So my question: is there a good way to extend the functionality of the
IPython notebook interface so that it allows me to set the input cell
type to non-python in a graphical way (e.g. pick from a menu), or
perhaps depending on some clever scanning of the input? If not, would
you be open to patches from my end? Anyone else here having struggled
with a similar problem? (e.g. to use the IPython interface to drive a
different computer algebra system and not wanting to put '%'s all over
the place?).

Thanks for the help.


More information about the IPython-dev mailing list