[issue13609] Add "os.get_terminal_size()" function

STINNER Victor report at bugs.python.org
Mon Feb 13 00:02:45 CET 2012


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

Using strace, I see that stty calls ioctl(TIOCGWINSZ) on stdin (fd=0)
if it failed on stdout (fd=1), whereas Python only tries stdout.

Attached patch implements a similar idea.

----------
Added file: http://bugs.python.org/file24503/get_terminal_size_pipe.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13609>
_______________________________________


More information about the Python-bugs-list mailing list