Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to read commands from a text file?

I have all my commands in a text file, and I would just like to run them in Sage. What is the easiest way to do this?

For example, in sage.txt, I have written:


The command with open('/home/sage.txt','r') as ll: bdrs=[sage_eval(l.strip()) for l in ll]; returns

File "<string>", line 1
SyntaxError: invalid syntax

Also, does Sage have a limit on how much RAM it can use? If yes, how can I increase the available memory?