How do I replicate the following batch command using python subprocess module?
myprogram < myinput.in > myoutput.out
In other words,
The following should work:
myinput = open('myinput.in') myoutput = open('myoutput.out', 'w') p = subprocess.Popen('myprogram.exe', stdin=myinput, stdout=myoutput) p.wait() myoutput.flush()