[Tutor] How to use "curses.resizeterm(nlines, ncols)"

Alan Gauld alan.gauld at yahoo.co.uk
Mon Feb 25 05:34:20 EST 2019


On 24/02/2019 23:25, boB Stepp wrote:

>> Secondarily, resizeterm() does not make a change to the terminal itself.
> 
> I realized this before I sent my original post.  I really think the
> name chosen, resizeterm, is a very misleading name!

Only in a world of GUIs.
Remember that curses is pre GUI. They did not think
of people changing the physical terminal size, that
was impossible. All you could do was reconfigure the
number of columns of text (usually from 40 to 80 to 132)
and sometimes the number of rows from 24 to 30.

That was what curses resizeterm had in mind when it
was written. The idea that some user could just grab
the corner of a GUI window and drag it out to any
size was a completely foreign concept.

Curses has been tweaked to play better with modern
GUIs but its roots, including the terminology used,
are from a day when physical terminals could not really
be resized, merely reconfigured(slightly).

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list