Author denilsonsa
Recipients denilsonsa, pitrou, zbysz
Date 2011-12-16.11:28:36
SpamBayes Score 0.000815451
Marked as misclassified No
Message-id <1324034917.26.0.537689379571.issue13609@psf.upfronthosting.co.za>
In-reply-to
Content
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.

[1]: http://bugs.python.org/file23241/patch1.1.diff

Reason? Imagine a program is launched, and thus it has COLUMNS set to some value. While the program is running, the user resizes the terminal. I believe (though I have not tested) that the envvar will keep the old value, and this function would return wrong dimensions.

In my opinion, the system-specific code (termios/windll) should be tried first, and then the envvars (as fallback). If all else fails, maybe it would be better to return (None, None) and let the caller of this function handle that.
History
Date User Action Args
2011-12-16 11:28:37denilsonsasetrecipients: + denilsonsa, pitrou, zbysz
2011-12-16 11:28:37denilsonsasetmessageid: <1324034917.26.0.537689379571.issue13609@psf.upfronthosting.co.za>
2011-12-16 11:28:36denilsonsalinkissue13609 messages
2011-12-16 11:28:36denilsonsacreate