I've got a main process in which I run a subprocess, which stdin is what I want to pipe. I know I can do it using files:
import subprocess
subprocess.call('shell command', stdin=open('somefile','mode'))
Is there any option to use a custom stdin pipe WITHOUT actual hard drive files? Is there any option, for example, to use string list (each list element would be a newline)?
I know that python subprocess calls .readline()
on the pipe object.