Hi,I need to use the Python interpreter as if it were a Matlab or Mathematica "kernel", i.e. running in the background while I use an interface program to send commands and get output.
Ideally, I would pipe some text "to" the interpreter (through a fifo, a socket...?) and got all the output back to the calling program, or appended to a text file, etc. Say:
# cat pythonInput.txt 1 + 1 # cat pythonInput.txt | myInterface > pythonOutput.txt # cat pythonOutput.txt 2or similar. Note that I need the *same* interpreter to run between consecutive calls of myInterface, to preserve the memory stack. Moreover, if I run a python script in the background, and not the bare interpreter, an input error could force the termination of the program, while I want the background "kernel" to keep up running.
At first I thought it was a trivial task, just change default input and output instead of tty, but I could not find out a solution!
Any help or hint is greatly appreciated! Best, Andrea
smime.p7s
Description: S/MIME cryptographic signature
-- http://mail.python.org/mailman/listinfo/python-list