[IPython-User] How to execute ipython notebook with cell-level magics from the command line?

Christoph Deil deil.christoph@googlemail....
Wed Nov 14 05:35:37 CST 2012

On Nov 14, 2012, at 11:42 AM, Matthias BUSSONNIER <bussonniermatthias@gmail.com> wrote:

> Le 14 nov. 2012 à 09:48, Christoph Deil a écrit :
>> Hi,
>> is it possible to execute an ipython notebook with cell-level magics from the command line?
>> I have a bunch of ipython notebooks that contain e.g.
>> %load_ext cythonmagic
>> %%cython
>> and I'd like to be able to run them from the command line for automatic testing.
>> I tried converting the ipynb file to a py file and then running it through
>> ipython -i myscript.py
> File with .py extension will be treated as plain python file. You have to rename them with .ipy extension for IPython to do its magic. 
> Still, Cell magic are not yet supported in ipy script.
> see this issue https://github.com/ipython/ipython/issues/2539
> Following gist might be a good starting point, or even do what you want.
> https://gist.github.com/2620735
> https://gist.github.com/2620876
> -- 
> Matthias

The scripts in your gists do what I want, i.e. run and test ipython notebooks.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20121114/440c1939/attachment.html 

More information about the IPython-User mailing list