Apr-13-2020, 05:13 PM
(This post was last modified: Apr-13-2020, 05:14 PM by deanhystad.)
IDLE redirects stdout, so it is not using sys.__stdout__. You need to save a reference to IDLE's stdout before you redirect (oldstdout = sys.stdout) and restore to that when you are done.