[IPython-dev] integrating with Cadabra computer algebra system

Thomas Kluyver takowl at gmail.com
Mon Nov 25 14:39:54 EST 2013


Hi Kasper,

On 25 November 2013 10:50, Kasper Peeters <kasper.peeters at phi-sci.com>wrote:

> 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?).


I think that should be possible. If nothing else, it would be possible to
write a JS shim which stored a Cadabra flag in cell-level metadata, and
prepended '%%cadabra' when it sent those cells for execution. I hope we can
work out something a bit neater than that, though.

Best wishes,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20131125/861fad7d/attachment.html>


More information about the IPython-dev mailing list