[python-win32] sys.stdout.closed missing with win32trace
TK Soh
teekaysoh at gmail.com
Sun Nov 4 05:15:40 CET 2007
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?
python script:
--------------------------
import win32traceutil
import sys
if not sys.stdout.closed:
print "stdout is opened"
--------------------------
Trace collector output:
--------------------------
Traceback (most recent call last):
File "try.py", line 3, in <module>
if not sys.stdout.closed:
AttributeError: 'PyTraceObject' object has no attribute 'closed'
More information about the python-win32
mailing list