Thanks William,

John:
I just tested it and it works fine with execfile.

Cheers,
Yi
--
http://www.yiqiang.org

On 10/12/07, William Stein <[EMAIL PROTECTED]> wrote:
>
>
> On 10/12/07, John Voight <[EMAIL PROTECTED]> wrote:
> >
> > Thanks Yi,
> >
> > It's definitely a start.  I absolutely need Cython compatibility--the
> > whole reason I'm using SAGE is the ease at which I can write optimized
> > code.
>
> Very interesting :-)
>
> >
> > Should we make this a trac ticket?  Why can't the dsage worker just
> > execute a load command?
> >
>
> Because the workers don't run Ipython, etc. They are just running pure
> python after all preparsing, etc.
>
> However, don't worry, you can easily just embed/inline cython code
> in a .sage file as illustrated below, so the fact that loading .sage
> files works is enough. E.g.,
>
> [EMAIL PROTECTED]:~/tmp$ more foo.sage
> cython("""
> def foo(x,y):
>     return x*y
> """)
>
> print foo(2,3)
> [EMAIL PROTECTED]:~/tmp$
>
> [EMAIL PROTECTED]:~/tmp$ sage
> ----------------------------------------------------------------------
> | SAGE Version 2.8.6, Release Date: 2007-10-06                       |
> | Type notebook() for the GUI, and license() for information.        |
> ----------------------------------------------------------------------
>
> sage: load foo.sage
> 6
> sage:
> Exiting SAGE (CPU time 0m0.04s, Wall time 0m14.25s).
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to