Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This is correct:

$ sage test.sage

Note that if you run a Sage script, the output of each command is not printed like on the command line. This is a general convention and how Python works. Similarly, a shell script doesn't echo each line either. If you want text to appear on the output you have to add a manual print 1+1 command.

If you want to manually run the Python in Sage you can't directly call $ $SAGE_ROOT/local/bin/python. Some environment variables need to be set up first. Instead, use

sage -python test.py