Rebinding stdout (was: Re: Python! Is! Truly! Amazing!)

michele.simionato at gmail.com michele.simionato at gmail.com
Mon Jan 3 09:51:21 EST 2005


(Not sure if my other message arrived)

I am guilty of using this idiom, too.

The standard library
http://www.python.org/dev/doc/devel/lib/module-sys.html#l2h-396

says:

"""
__stdin__
__stdout__
__stderr__
These objects contain the original values of stdin, stderr and
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.
"""

Notice the "during finalization" sentence.
Maybe you should change the doc and explain what __stdout__ is intended
for?

        Michele Simionato




More information about the Python-list mailing list