STINNER Victor added the comment:

I backported and adapted most Python 3 fixes related to the Windows binary mode 
for stdout/stderr used when Python is started with the -u command line option. 
See attached binary.patch.

My change to file.write() looks wrong because the function returns None and 
does not loop until all bytes are written.

By the way, string_write() doesn't check if fwrite(n) wrote less than n bytes 
or failed with an error.

See also the issue #21090 which improves error handling in the file object.

----------
keywords: +patch
Added file: http://bugs.python.org/file36145/binary.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21946>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to