I am accessing an executable file through subprocess
, The exe, takes two file inputs like so,
foo.exe file1.txt file2.txt
It also accepts pipe's as inputs, so I give one of the files to the exe through a subprocess.PIPE
, which works fine(can test it with a single file), however, because each process has a single stdin, I cannot supply the second file. I could pipe one input, then write, read the other, however both of the input files are generated inside the Python program, I don't want to decrease the speed of the code by writing to hard disk, rather use some other method to pipe the second file, which is on RAM. How can I achieve this ?
I am on Windows 10, with Python 3 (if the solution is system dependant).