I'm building a python curses application.
I have two ways of printing to the curses window: print x, and windows.addstr(x) (and the other similar window.* options).
However, for debugging purposes, I'd like to be able to print to the standard console, so when I exit the curses window, I have the infomation waiting for me to be seen. I would normally just use print x, but that prints to the curses window.
sys.stout.write() also fails.
How can I do this?
After using sys.stdout after os.fdopen, this is the traceback
 curses.nocbreak()
 _curses.error: nocbreak() returned ERR
 close failed in file object destructor:
 sys.excepthook is missing
 lost sys.stderr