On Fri, Feb 15, 2008 at 4:21 PM, Greg Ewing <[EMAIL PROTECTED]> wrote: > Adam Olsen wrote: > > That'd rely on prompt deletion for correct behaviour. Why not an > > explicit detach method? > > > > buf = sys.stdout.buffer > > sys.stdout.detach() > > sys.stdout = io.TextIOWrapper(buf, "utf-8") > > Or keep an explicit count of the number of unclosed > wrappers that are referencing a buffer.
Yuck. We have to do this for sockets and it's a mess. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com