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.

-- 
Greg
_______________________________________________
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

Reply via email to