[python-win32] win32tracutil traceback on Vista
TK Soh
teekaysoh at gmail.com
Mon Nov 19 13:05:43 CET 2007
On Nov 19, 2007 7:56 PM, Mark Hammond <mhammond at skippinet.com.au> wrote:
> > While we are here, is it possible to add a 'closed' attribute to
> > win32trace also, as I mention in an earlier post to the list?
>
> Sure - although I'm afraid your earlier post has been lost (by me).
> Adding a patch to the pywin32 project at sourceforge is probably the
> best way to ensure that doesn't happen in the future...
My original post is as below:
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