June 11, 2012
6:12 a.m.
On Mon, Jun 11, 2012 at 2:43 AM, Serhiy Storchaka <storchaka@gmail.com> wrote:
On 10.06.12 18:44, Nick Coghlan wrote:
This approach also has the advantage of leaving sys.__std(in/out/err)__ in a somewhat usable state.
And then sys.std* and sys.__std*__ have their own inconsistent buffers.
Correct, but using detach() leaves sys.__std*__ completely broken (either throwing exceptions or silently failing to emit output). Creating two independent streams that share the underlying file handle is much closer to the 2.x behaviour when replacing sys.std*. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia