On 2010-12-11 14:10, G Hahn wrote:
> Thanks for the link and your help! If avoiding the preparser just
> consists in putting a "%python" in the first line and starting the
> timing from another cell, then I already did that. But still the
> notebook is quite slow in my opinion.
> Instead, I saved the code as a .py file and loaded it via "load
> file.py" in the shell. This seems to work fine. But nevertheless my
> original code was supposed to be in Cython (i.e. first line is
> %cython) and was compiled by the notebook when pressing ALT+ENTER. Now
> that I use the shell and a .py file, the first line "%cython" in front
> of the actual code apparently doesn't work any more. Is it possible to
> save the "_spyx.c" files generated by the notebook compiler and to
> load them in the sage shell?
> Thanks,
> Georg
> 

The notebook should never be substantially slower.  Either you're doing
something different in the shell and in the notebook, or you found a
genuine bug.

If you want to load Cython code in the Sage shell, write your Cython
code (without the %cython line) in a .spyx file and then load() that file.

Jeroen.

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to