Hello Jason, it works! Thanks. May I follow up with a question. Eventually, I want to compile codes written in SAGE into faster executable codes. How should I do it? Do I need to translate it into Python first then run Cython on it?
I tried moving example.py into example.spyx then run Cython, it returns an error. However, it works after the line "from sage.all_cmdline import *" is deleted from the .py file. I guess there must be a better way to turn SAGE code into faster executable code. Thanks On Apr 27, 8:29 am, Jason Bandlow <[EMAIL PROTECTED]> wrote: > Hello, > > > > pong wrote: > > Sorry for asking such a basic question but I still have trouble with > > it. > > > I have created example.sage with the following content > > > print "Hello World" > > print 2^3 > > > and load it into SAGE by load "example.sage". My understanding of the > > tutorial is that SAGE will convert this into python and save it in the > > same directory (in my case /home/sage). However, I cannot find the > > python file. I have also tried saving it as a .spyx file and run load > > but it does not work either. So may I know: > > > 1) how to convert a .sage file into a .py file? > > From the command line: > $ sage -preparse example.sage > > That should create a file example.py in the same directory.> 2) could it be > some sort of permission problem preventing SAGE from > > the .py file into the file system? (I'm running SAGE on a window > > machines via vmware) > > > Please help > > Thanks > > Cheers, > Jason --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@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-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---