<div dir="ltr">Maybe this can be useful? <a href="http://ipython.org/ipython-doc/dev/development/wrapperkernels.html">http://ipython.org/ipython-doc/dev/development/wrapperkernels.html</a><div><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">2014-07-07 7:20 GMT+02:00 Thomas Wiecki <span dir="ltr"><<a href="mailto:thomas.wiecki@gmail.com" target="_blank">thomas.wiecki@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div><div><div><div><div>Hi all,<br><br></div>I'm trying to do some static syntax checks (AST parsing) on the code in an IPyNB cell and then either execute the cell or not. I'd also like to control the output that the cell produces.<br>


<br></div>With the magic-interface I know that I can define a function that gets the cell code as a string. This would work well here except that I want this for all cells.<br><br></div>With my limited understanding of the IPyNB internals I would see three ways this could be achieved:<br>


</div>* There is a hook in the IPyNB I can use like the magic<br></div>* I have to change the IPyNB client code to do the analysis before it's sent to the kernel.<br></div>* I change the kernel to do the analysis.<br>


<br></div>Which of these is the best? Can someone point me to the relevant code section I would need to make changes to?<br><br>Thanks,<br>Thomas<span class="HOEnZb"><font color="#888888"><br clear="all"><div><div><div><div>
<div><div><div><div><div><br>-- <br><div dir="ltr">

Thomas Wiecki<div>PhD candidate, Brown University<div></div><div>Quantitative Researcher, Quantopian Inc, Boston<br></div></div></div>
</div></div></div></div></div></div></div></div></div></font></span></div>
<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>
<br></blockquote></div><br></div>