This is two questions really:
- how do I resize a curses window, and
- how do I deal with a terminal resize in curses?
Is it possible to know when a window has changed size?
I really can’t find any good doc, not even covered on http://docs.python.org/library/curses.html
Terminal resize event will result in the
curses.KEY_RESIZEkey code. Therefore you can handle terminal resize as part of a standard main loop in a curses program, waiting for input withgetch.