<div dir="ltr"><div><div><div><div><div>I am not a core IPython developer, but if I understand you correctly what you want is a Cadabra kernel.<br><br></div>Which kernel is used when running IPython dictates how code is handled.<br>
<br></div><div>The (AFAIK) up-to-date and authorative specification for the design of the kernel architecture and what a kernel needs to accept and return is here: <a href="http://ipython.org/ipython-doc/stable/development/messaging.html#messaging">http://ipython.org/ipython-doc/stable/development/messaging.html#messaging</a><br>
</div><div><br></div><div>Other than that, <a href="http://nbviewer.ipython.org/4279371/node-kernel.ipynb">this</a> purports to explain the construction of a new IPython kernel in the context of node.js, but I am not the author and make no claims as to its currentness or correctness:<br>
</div><br></div>There is also the IJulia kernel, which I believe was constructed by the Julia folks in direct collaboration with (some part of) the IPython team: <a href="https://github.com/JuliaLang/IJulia.jl">https://github.com/JuliaLang/IJulia.jl</a><br>
<br></div>Hope that helps.<br></div>~G<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 25, 2013 at 10:50 AM, 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">Hi,<br>
<br>
I am the author of Cadabra, an open source computer algebra system for<br>
tensor computations in field theory,<br>
<br>
<a href="http://cadabra.phi-sci.com/" target="_blank">http://cadabra.phi-sci.com/</a><br>
<br>
This system currently has its own notebook-based GUI and its own<br>
(restricted) programming language. I am considering switching the<br>
language to Python, and also thinking of using IPython for the GUI, to<br>
take some of the load off my shoulders.<br>
<br>
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?).<br>
<br>
Thanks for the help.<br>
<br>
Cheers,<br>
Kasper<br>
_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Gabriel Becker<br>Graduate Student<br>Statistics Department<br>University of California, Davis<br>
</div>