[python-win32] sys.stdout.closed missing with win32trace

TK Soh teekaysoh at gmail.com
Sun Nov 4 12:49:49 CET 2007


On 11/4/07, Michael Foord <fuzzyman at voidspace.org.uk> wrote:
> TK Soh wrote:
> > It looks like the "closed" attribute for sys.stderr and sys.stdout are
> > missing when win32trace is in effect. Any way to work around this?
> >
>
> I have no idea about win32traceutil, but the sys module provides
> sys.__stdout__ and sys.__stderr__ so that even when modules replace the
> streams with custom objects you can still access the originals. This may
> or may not be helpful...

Thanks for the inform. I am actually calling some library that does
the checking on closed attribute. It's be nice to be able to somehow
add the closed attribute to win32trace.


More information about the python-win32 mailing list