<div class="gmail_quote">On Thu, Apr 15, 2010 at 09:04, Nick Coghlan <span dir="ltr">&lt;<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>&gt;</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>
&gt; Because subprocess pipes<br>
&gt; can&#39;t be read from until EOF and I want to read from them before that,<br>
&gt; use ctypes to peek by using PeekNamedPipe.<br>
<br>
</div>That&#39;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&#39;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&#39;ve taken a few whacks at it and haven&#39;t gotten it 100% right yet. It seems to be working for the time being but it&#39;s still susceptible to failure, and I&#39;d like to not use ctypes if possible.<br>
</div></div>