sys.__stdout__
__stdout__
Contains the original value of sys.stdout at the start of the program. They are used during finalization, and could be useful to restore the actual files to known working file objects in case they have been overwritten with a broken object.