[issue22389] Generalize contextlib.redirect_stdout

2014-09-29 Thread John Isidore
John Isidore added the comment: There is stdout_redirected() function [1] that allows to redirect a file object given as `stdout` patameter including `sys.stderr`. It works at a file descriptor level i.e. it supports redirecting subprocess' output too but it doesn't work for Strin

[issue21454] asyncio's loop.connect_read_pipe makes pipes non-blocking contrary to the documentation

2014-05-08 Thread John Isidore
New submission from John Isidore: the documentation for BaseEventLoop.connect_read_pipe says: > "pipe is file-like object **already switched** to nonblocking." http://hg.python.org/cpython/file/232938736a31/Doc/library/asyncio-eventloop.rst#l453 But it looks like connect_read_p