Amaury Forgeot d'Arc <amaur...@gmail.com> added the comment:

Even if python.exe starts normally, py.test for example uses os.dup2() to 
redirect the file descriptors 1 and 2 to temporary files. sys.stdout.fileno() 
is still 1, the STD_OUTPUT_HANDLE did not change, but normal print() now goes 
to a file; but the proposed script won't detect this and will write to the 
console...
Somehow we should extract the file handle from the file descriptor, with a call 
to _get_osfhandle() for example.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1602>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to