Richard Oudkerk <shibt...@gmail.com> added the comment: 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. ---------- nosy: +sbt _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue1191964> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com