[Tutor] Use of POPEN
rgordon9 at swbell.net
Tue Jul 13 23:28:01 CEST 2004
I am trying to redirect a spawned program's input stream using the following:
pipe = os.popen('myprog.exe', 'w')
when I perform the write, I receive the following error msg:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
IOError: [Errno 22] Invalid argument
I am running under Windows2000. When launched, myprog.exe starts by printing some information to stdout and then waits for input from stdin.
Do I also have to redirect stdout using popen2, for example, or will the output from myprog go to the bit bucket? If the later, then why do I receive the error dealing with stdin?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor