thread specific sys.stdout?

Diez B. Roggisch deetsNOSPAM at
Wed Sep 15 23:31:42 CEST 2004

Peter Hansen wrote:

> Have you run this code?  It looks to me suspiciously as
> though it will raise an exception on the second write
> call in any given thread, as the non-shortcircuiting call
> to .get() tries to open the nice_file in write mode for
> a second time.

Nope, didn't run it - and you are right of course. I should have said  more
clearly that the code was untested - I thought that describing it as  

"might look roughly like this"

would suffice.

> Also, what's "_" supposed to be here?  self?

Yup it is - I use _ for self - I tried to adapt to the common standard for
the post, but failed in the middle of it. Sorry for the confusion.


Diez B. Roggisch

More information about the Python-list mailing list