<div dir="ltr"><div class="gmail_extra">Hi Kasper,<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 25 November 2013 10:50, Kasper Peeters <span dir="ltr"><<a href="mailto:kasper.peeters@phi-sci.com" target="_blank">kasper.peeters@phi-sci.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
However, I would like the notebook interface to retain the capability of<br>
accepting pure Cadabra expressions into an input cell, and have those<br>
evaluated using Cadabra rather than Python. I know IPython has the<br>
ability to evaluate input cells which contain e.g. R code, but that<br>
always seems to require a magic '%' bit at the beginning of a cell.<br>
<br>
So my question: is there a good way to extend the functionality of the<br>
IPython notebook interface so that it allows me to set the input cell<br>
type to non-python in a graphical way (e.g. pick from a menu), or<br>
perhaps depending on some clever scanning of the input? If not, would<br>
you be open to patches from my end? Anyone else here having struggled<br>
with a similar problem? (e.g. to use the IPython interface to drive a<br>
different computer algebra system and not wanting to put '%'s all over<br>
the place?).</blockquote></div><br></div><div class="gmail_extra">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.<br>

<br></div><div class="gmail_extra">Best wishes,<br></div><div class="gmail_extra">Thomas<br></div></div>