On Oct 30, 2009, at 2:37 AM, William Stein wrote:

>
> Hi,
>
> Sage devs might want to read this new talk:
>
> http://behnel.de/cython200910/talk.html
>
> It's Cython _not_ from Robert Bradshaw's perspective.

I'll second the recommendation--it's always enlightening to read stuff  
from a different perspective.

One other thing that he doesn't mention that might be of interest is 
http://wiki.cython.org/enhancements/compilerdirectives

> I learned a
> few things I didn't know.  For example, it is trivial to create a
> standalone binary executable that links in Sage (on OS X):
>
> 1. Create hw.py:
>
> import sage.all
> def hello_world():
>    import sys
>    print "Welcome to Sage - ", sage.all.factor(89392)
>
> if __name__ == '__main__':
>    hello_world()
>
> 2. Do "sage -sh", then

Note that you need to pass the --embed flag here to create the main()  
method, as in

sage subshell$ cython --embed hw.py

> sage subshell$ gcc -I$SAGE_LOCAL/include/python2.6/
> $SAGE_LOCAL/lib/libpython2.6.a -o hw hw.c
> sage subshell$ ./hw
> Welcome to Sage -  2^4 * 37 * 151
>
> sage subshell$ ls -lh hw
> -rwxr-xr-x  1 wstein  staff   1.9M Oct 30 02:36 hw
>
> -- William
>
> ---------- Forwarded message ----------
> From: Stefan Behnel <stefan...@behnel.de>
> Date: Fri, Oct 30, 2009 at 2:08 AM
> Subject: [cython-users] Cython tutorial slides
> To: cython-us...@googlegroups.com
>
>
>
> Hi,
>
> I just uploaded the slides from a recent tutorial talk I gave about  
> Cython.
>
> http://behnel.de/cython200910/talk.html
>
> Have fun,
>
> Stefan
>
>
>
> -- 
> William Stein
> Associate Professor of Mathematics
> University of Washington
> http://wstein.org
>
> >


--~--~---------~--~----~------------~-------~--~----~
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