I wish this help you Blocking the SIGWINCH fixed the problem, as suggested by @KarstenKoop's comment. Checking the signals being listened by processes according to unix.stackexchange.com/q/85364/114939, we can see that no processes blocks the signal SIGWINCH, even the processes lauched by system().
To fix this issue If you want "real" (pseudo-;-) terminals, and are using X11 (almost every GUI interface on Linux does;-), you could exec xterm -e python node.py instead of just python node.py -- substitute for xterm whatever terminal emulator program you prefer, of course (I'm sure they all have command-line switches equivalent to good old xterm's -e, to specify what program they should run!-).
Not getting back terminal prompt after fork-exec-dup
Hope that helps ncursesresponds to window-resizing events, i.e., SIGWINCH. It does not resize the terminal (see manual page for resizeterm). xterm and some other terminal emulators respond to an escape sequence which tells it to resize. You can exercise that with the utility program resize, e.g.,
resize -s 40 80
Resize terminal and scrolling problem with ncurses