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

Zbyszek Szmek report at bugs.python.org
Mon Jan 2 23:43:19 CET 2012


Zbyszek Szmek <zbyszek at in.waw.pl> added the comment:

Updated patch termsize.diff.3

- s/TerminalSize/terminal_size/ in Python code
- change the fallback to (80, 24) (seems to be the commonest default)
- s/Py_CLEAR/Py_DECREF/
- use STDOUT_FILENO
- add more hrefs in docs
- include <termios.h> is available (untested fix for solaris compatibility)
- rename TerminalSize as terminal_size in Python code

I tested this iteration only on linux and windows, but it is not substantially changed, so should still work on *bsd. (I previously
tested on debian/kfreebsd and dragonflybsd and it seemed functional).

----------
Added file: http://bugs.python.org/file24127/termsize.diff.3

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


More information about the Python-bugs-list mailing list