Where do stdout and stderr go when in curses mode?
问题 Where do stdout and stderr go when curses is active? import curses, sys def test_streams(): print "stdout" print >>sys.stderr, "stderr" def curses_mode(stdscr): test_streams() test_streams() curses.wrapper(curses_mode) Actual output is stdout stderr Update0 Expected output is stdout stderr stdout stderr entering, and then exiting curses mode with no change to the final text shown in the terminal. 回答1: Activating curses saves the terminal text screen's current contents and clears said screen;