<div class="gmail_quote">On Thu, Apr 15, 2010 at 09:04, Nick Coghlan <span dir="ltr"><<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">brian.curtin wrote:<br>
> Because subprocess pipes<br>
> can't be read from until EOF and I want to read from them before that,<br>
> use ctypes to peek by using PeekNamedPipe.<br>
<br>
</div>That's not true. You may need to write a line feed or otherwise flush<br>
the stream in the subprocess, but the parent process can definitely read<br>
data before the pipe is closed. We used to have problems with pipe<br>
buffers on Windows filling that were solved solely by creating a thread<br>
dedicated to clearing any received data out of the pipe.<br>
<br>
Cheers,<br>
Nick.<br></blockquote><div><br>That's what I thought as well (line feed and/or flush), but I was not able to get that working at all. I opened issue #8405 last night for fixing this test up since I've taken a few whacks at it and haven't gotten it 100% right yet. It seems to be working for the time being but it's still susceptible to failure, and I'd like to not use ctypes if possible.<br>
</div></div>