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

Zbyszek Szmek report at bugs.python.org
Fri Jan 6 14:27:11 CET 2012


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

One more comment on $COLUMNS overriding the actual terminal size:

> Zbyszek, I just looked at [1] and I disagree that the environment
> variable should have higher precedence. In fact, I believe it should
> have lower precedence, and should be used as a fallback.

To fix issue #9553 "test_argparse.py: 80 failures if COLUMNS env var set to a value other than 80", sys.env['COLUMNS']=80 is set during tests.
If issue #13041 is fixed and a real terminal size is used, then
unless $COLUMNS have higher preference, the tests would break again.

----------

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


More information about the Python-bugs-list mailing list