Fellow Pythonites may kill me for this, but I suggest you zoom over to
comp.lang.perl and pick up the Perl FAQ. Not because Perl is necessarily
better at this than Python, but because people have been asking the same
question about Perl for years, and somebody already went to the trouble
of writing a good answer. Somebody already went to the trouble of doing
it the right way in Perl, too <wink>.
The short course is that pipes are an inherently poor base for what you
want to do, because they're prone to deadlock problems (e.g., what if
your child process simply doesn't respond when you thought it would?
then your program blocks forever waiting on a read that never yields).
Nevertheless, you _can_ give it a try, just like they explain in the Perl
FAQ (except rewrite it in Python <wink>).
Sockets are a better solution. The Perl FAQ will point you to some good
Perl packages for that, or e.g. you can take a look at Python's
nntplib.py (in the std library distribution) for a working example of how
to communicate in Python via sockets.
One friendly warning: UNIX(tm) does little to make any of this easy,
and vital details may differ depending on your system.
last-time-i-looked-at-this-stuff-i-ran-away-in-full-panic-ly y'rs - tim
Tim Peters firstname.lastname@example.org
not speaking for Kendall Square Research Corp