Hi all, is it possible to write a file with a "sage program" (a set of sage command) and then execute the program?
I tried to write a file (called test.py) just with one line: print 3 Then I typed in the Linux command line: ./sage test.py It worked! I got 3 as a result. Then I tried to construct a bit more complicated code: A = Matrix([[1,2,3],[3,2,1],[1,1,1]]) A.eigenvectors_right() Unfortunately it did not work. I got the following: Traceback (most recent call last): File "test.py", line 1, in <module> A = Matrix([[1,2,3],[3,2,1],[1,1,1]]) NameError: name 'Matrix' is not defined sage: Error running test.py using Python Is it possible to run test.py not by using Python, but as a set of sage commands? Thank you in advance. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---