Dāvis added the comment:

if there's no console then os.device_encoding won't fail, it will just return 
None which means that ANSI codepage will be used like it currently is and so 
here it doesn't change anything, current behavior stays.
Also like I showed TextIOWrapper already calls device_encoding even if there's 
no console. And device_encoding doesn't actually use that fd it just checks if 
it's valid fd and then calls GetConsoleCP/GetConsoleOutputCP to get encoding.

----------

_______________________________________
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

Reply via email to