[docs] [issue18512] sys.stdout.write does not allow bytes in Python 3.x

Ezio Melotti report at bugs.python.org
Tue Aug 20 17:21:26 CEST 2013

Ezio Melotti added the comment:

> A workaround is to perform sys.stdout.flush() before 
> sys.stdout.buffer.write().

FWIW you can just use print(..., flush=True) from 3.3+.


Python tracker <report at bugs.python.org>

More information about the docs mailing list