ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 26 Nov 2019 01:03:50 +0100Grabbing Output in Linuxhttps://ask.sagemath.org/question/48884/grabbing-output-in-linux/Hello!
I have a great deal of code written in Pascal, and this code runs on a linux terminal. Currently, the only way I can run sage math through this program is to do the following: type a list of commands to run in sage as a concatenated strings separated by semicolons, and I then write the output to a textfile. For example 'load(''whatever'');function_call(something);... > sometextfile.txt'. This entire line is written in a call to the terminal. Effectively what is fed is *sage -c that-string*. The problem with this method is it adds time because sage has to open and close every time it runs. Is there a command in sage that allows me to keep the sage terminal persistent and I then ping that terminal with new commands. I assume the way to ping with new commands is to pipe from one terminal to the one running sage, but I am not a unix connisseur.
Of course, the easiest method is to run my code via python and have python run the pascal code. This is, unfortunately, not an option.KraigTue, 26 Nov 2019 01:03:50 +0100https://ask.sagemath.org/question/48884/