1 | initial version |
1: That's what Python and IPython do. However if you do
def loop():
for i in range(4):
i^2
loop()
then even at the REPL prompt you won't see output. The REPL doesn't get to execute the individual commands and print their return values for you, because the commands are already packaged up in a function.
2: If your input is in "long_input_file.sage" you could use
sage <long_input_file.sage
or
cat long_input_file.sage | sage
then your input is still entered into sage "through the REPL": by redirecting STDIN. (assuming a unix-type command line environment)