[Tutor] Replacing keyboard input to EXE file
A.T.Hofkamp
a.t.hofkamp at tue.nl
Thu Jun 11 14:26:08 CEST 2009
eShopping wrote:
> import subprocess
>
> x = subprocess.Popen(args="poly.exe",stdin=subprocess.PIPE)
>
> for item in ["polyin.dat", "polyout.dat", "polyout.plt"]:
> x.stdin.write('%s\n' % item)
>
> but got the same error message
Above code would seem to be correct.
Are you sure the Fortran program accepts the names?
One easy way to test this is to try
C:\> poly.exe < poly_files.txt
in a CMD program (or COMMAND or whatever the console program is called
nowadays at Win* systems).
Albert
More information about the Tutor
mailing list