[IPython-dev] Using multiple %%cython cell magics in the Notebook

Fernando Perez fperez.net at gmail.com
Wed Aug 28 18:42:27 EDT 2013

Makes total sense, waiting for your PR :)

On Wed, Aug 28, 2013 at 3:31 PM, Cyrille Rossant
<cyrille.rossant at gmail.com> wrote:
> I'd like to use a function defined in a %%cython cell magic in another
> %%cython cell magic. I could try to find the module's name of the
> first cell magic (which is randomly generated) and import it in the
> second, but that's not really convenient when dealing with many cells.
> I tried %%cython_pyximport (which accepts a module name as argument)
> but it does not work with "cimport numpy as np" (ImportError: Building
> module mymodule0 failed: ["CompileError: command 'cl.exe' failed with
> exit status 2\n"], I'm on Windows 8 64 bits, and this command does
> work with %%cython). And the documentation suggests to use %%cython
> anyway.
> AFAIK %%cython does not accept an argument with the module name, which
> could be used in subsequent modules for import. I think it would be
> straightforward to add such option, I could do it if you think that's
> a good idea.
> What would you recommend?
> Best,
> Cyrille
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev

Fernando Perez (@fperez_org; http://fperez.org)
fperez.net-at-gmail: mailing lists only (I ignore this when swamped!)
fernando.perez-at-berkeley: contact me here for any direct mail

More information about the IPython-dev mailing list