popen on Win 9x?

RPM1 rpm1deletethis at frontiernet.net
Thu Nov 15 22:28:58 EST 2001


Goal: Write a python program that can call two other C programs and interact
with the stdin and stdout of the C programs on Win 98.

The two C programs are chess programs that I won't have source to.  I want
the two programs to play against each other.  I have been successful at
using popen2 to act as stdin and stdout for either chess program separately
but when I try to communicate with both I have problems when I close the
second program's pipes.  It leaves the process running and leaves a W9xpopen
process going and at least one Winoldap process.

I open the pipes to each program and then write and read the pipes, (using
fstat and stat to determine how much data is in the pipes coming from the
chess programs so I don't block).  My program works on Windows NT but not on
98.

Any thoughts?

Thanks,
    Patrick






More information about the Python-list mailing list