[Python-checkins] r80086 - python/trunk/Lib/test/test_os.py

Nick Coghlan ncoghlan at gmail.com
Thu Apr 15 16:04:36 CEST 2010


brian.curtin wrote:
> Because subprocess pipes 
> can't be read from until EOF and I want to read from them before that,
> use ctypes to peek by using PeekNamedPipe.

That's not true. You may need to write a line feed or otherwise flush
the stream in the subprocess, but the parent process can definitely read
data before the pipe is closed. We used to have problems with pipe
buffers on Windows filling that were solved solely by creating a thread
dedicated to clearing any received data out of the pipe.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------


More information about the Python-checkins mailing list