[issue14841] os.get_terminal_size() should check stdin as a fallback

daniel hahler report at bugs.python.org
Fri Apr 5 07:52:14 EDT 2019


daniel hahler <python-bugs at thequod.de> added the comment:

Created a PR at https://github.com/python/cpython/pull/12697.

It prefers stdin and stderr over stdout.

I think stdin is most likely connected to a terminal, and wondered why ncurses uses stderr/stdout first, and only then stdin.
stdin handling was added there in https://github.com/mirror/ncurses/commit/aa70bf3c#diff-10ad6ea20599ac9258757354665b80cbR1295, and it looks just like an oversight maybe - it is also not that critical in C I guess.

----------
nosy: +blueyed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue14841>
_______________________________________


More information about the Python-bugs-list mailing list