This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zbysz
Recipients Arfrever, amaury.forgeotdarc, denilsonsa, giampaolo.rodola, loewis, neologix, pitrou, rosslagerwall, vstinner, zbysz
Date 2012-01-06.23:07:00
SpamBayes Score 2.9439545e-07
Marked as misclassified No
Message-id <>
>> - fd argument is retained, because we might want to test terminals
>>  opened with openpty.
> You mean a terminal different than the one used for stdin, stdout and 
> stderr?

For example, let's see what is the size of my two xterms:

>>> os.get_terminal_size_raw()
os.terminal_size(columns=125, rows=39)
>>> fd ='/proc/22736/fd/1', os.O_RDONLY)
>>> fd
>>> os.get_terminal_size_raw(6)
os.terminal_size(columns=95, rows=33)

I'm not saying that this serves a clear purpose, but it is possible
and it is good not the restrain the API. I'm sure somebody could find
a use for it.

>> - two functions: still there. I think that get_terminal_size() should
>>  provide an easy-to-use, even trivial-to-use, way to get a sensible
>>  value without writing a wrapper. In the _majority_ of cases the
>>  wrapper would be something like get_terminal_size() currently.
> get_terminal_size() looks like [less?] reliable than raw_get_terminal_size()
> because environment variables are not updated when the terminal is
> resized.
Please look at my comment above:
$COLUMNS is only used for overriding -- it normally _isn't_ set.
Date User Action Args
2012-01-06 23:07:01zbyszsetrecipients: + zbysz, loewis, amaury.forgeotdarc, pitrou, vstinner, giampaolo.rodola, Arfrever, denilsonsa, neologix, rosslagerwall
2012-01-06 23:07:01zbyszsetmessageid: <>
2012-01-06 23:07:00zbyszlinkissue13609 messages
2012-01-06 23:07:00zbyszcreate