KEY_RESIZE not returned from getch() when xterm is resized
问题 I am using Python 3.7 on a Debian Linux 9 box with the standard readline and curses modules. The following code should output 'True' when run inside an xterm and the xterm is resized: import readline import os import curses terminal_resized = False def main(stdscr): global terminal_resized ch = stdscr.getch() if ch == curses.KEY_RESIZE: terminal_resized = True os.unsetenv('LINES') os.unsetenv('COLUMNS') curses.wrapper(main) print(terminal_resized) However, the output is 'False', indicating