> With the SAGE preparser (for .sage files and in the notebook), we could > even do something so > > f = lambdax n,m : return n * m + 1 > > would really get SAGEx'd. We could also make a special syntax so > whole blocks of code can be SageX'd on the fly, without having to > be included in triple quotes. E.g., > > n = 5 > > def f(m): > return m^2 + n*m > > > %sagex # switch to SageX > def foo(n,m): > k = n*m > c-library calls > cdef int i. > etc. > return k > > %sage # switch back to SAGE > > a = 17 > > print foo(3,7) > > > What do you think? Basically, I'm suggesting extending the % syntax > from the SAGE notebook to .sage files. If nothing else, it would > mean that when I edit a file with embeded SageX code, it would still > get nice syntax hilighting in emacs...
I'm not sure: * I think the preparser should do very few things (if any) * If you're really writing a file with a large pyrex block, why not write another spyx file using emacs' Pyrex mode? * On the other hand it could be very handy. Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _www: http://www.informatik.uni-bremen.de/~malb _icq: 177334829 _jab: [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ 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/ -~----------~----~----~----~------~----~------~--~---