Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How do I get output from sage -c ?

Please compare:

$ Downloads/sage-4.5.3.rc0/sage -c 'is_prime(991)'

$ Downloads/sage-4.5.3.rc0/sage -c 'print is_prime(991)'

True

Should sage -c also print to the standard output the result of the command? That would seem a lot more useful. Right now Sage has to get all fired up just to act as a once-off calculator. But maybe this is actually a feature, consistent with other programs that one can call in once-off fashion?