Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 2010-09-03 05:02:17 -0500

kcrisman gravatar image

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?