get the terminal's size

Alex Ternaute alex at lussinan.invalid
Mon Jan 14 12:16:24 EST 2019


Hi Thomas
>> Looking on the internet for a hint, I see that python3 has an
>> os.get_terminal_size().
> Use that then.

Up to now I wanted to keep compatibility with a big bunch of code in 
Python2 that I do no maintain by myself.
Well, I saw that get_terminal_size() follows the windows resizings.
Whenever I consider forking to Python3, this would be my 1st step.
 
>> Please, is there something similar for python2 ?
> I suspect there is some solution in the curses module...

I did dir(curse) but I could not see if something goes this way.
Bye
-- 
Alex


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /