Comments on Josiah's patch:
* It uses pywin32 for PeekNamedPipe -- this is now available from _winapi.
* I don't think send(), recv() and recv_exact() will work correctly if
buffering is used -- an error should be raised in this case.
* I think send(), recv(), recv_exact() should raise errors if the
associated stream is None instead of returning 0 or ''.
Additional comments on http://code.google.com/p/subprocdev
* In a few places the code does "raise Exception(...)" -- some other
exception class should be used.
* It is not clear to me why TextIOWrapper should try to implement seek()
and tell(). (The file-like wrapper for a socket does not.)
* I don't like the hardwired timeouts for faking asynchronicity:
Popen.asyncread(), Popen.asyncwrite() use 0.1 seconds, and
TextIOWrapper.read() uses 1.25 seconds.
* There is no binary counterpart to TextIOWrapper.
* Using fcntl.fcntl() to switch back and forth between blocking and
unblocking is unnecessary. select() guarantees the read/write on a pipe
will succeed without blocking. (The same is not necessarily true with
a socket.)
* __closecheck() should be renamed _closecheck().
* FileWrapper is just a wrapper for TextIOWrapper, except that it has an
ignored newlines argument.
* I can't see any documentation.