Martin Panter added the comment: Patch B changes _Py_device_encoding() to accept a file descriptor of 3, which seems wrong to me.
Patch A is like the earlier patch, but calls os.device_encoding(1) instead of relying on sys.stdout, etc. I think this will still fail when the Python parent’s stdout was never open (then fd 1 will be invalid, or used as something else). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27179> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com