[IPython-dev] Static code analysis of IPython Notebook cell

Cyrille Rossant cyrille.rossant at gmail.com
Mon Jul 7 05:02:21 EDT 2014

Maybe this can be useful?

2014-07-07 7:20 GMT+02:00 Thomas Wiecki <thomas.wiecki at gmail.com>:

> Hi all,
> 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.
> 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.
> With my limited understanding of the IPyNB internals I would see three
> ways this could be achieved:
> * There is a hook in the IPyNB I can use like the magic
> * I have to change the IPyNB client code to do the analysis before it's
> sent to the kernel.
> * I change the kernel to do the analysis.
> Which of these is the best? Can someone point me to the relevant code
> section I would need to make changes to?
> Thanks,
> Thomas
> --
> Thomas Wiecki
> PhD candidate, Brown University
> Quantitative Researcher, Quantopian Inc, Boston
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140707/b33c91d1/attachment.html>

More information about the IPython-dev mailing list