[issue17647] subprocess.communicate() should preserve colored output on Windows

2013-04-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: We seem to agree that this is an OS+application issue, not a Python issue. I think the red FAILEDs would be nice for unittest (a possible separate issue). -- nosy: +terry.reedy resolution: - invalid status: open - closed

[issue17647] subprocess.communicate() should preserve colored output on Windows

2013-04-12 Thread Caitlin Potter
Caitlin Potter added the comment: A suggestion to work around this from #waf on freenode: http://codepad.org/1Y8K9e2m So it is probably not a big deal and can be wrapped up. But still it would be nice if Windows had native support for ANSI colours. On Fri, Apr 12, 2013 at 2:08 PM, Terry J.

[issue17647] subprocess.communicate() should preserve colored output on Windows

2013-04-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: Caitlin, when you reply by email, please snip the previous post as I have here, as it is already displayed directly above the reply on the website. -- ___ Python tracker rep...@bugs.python.org

[issue17647] subprocess.communicate() should preserve colored output on Windows

2013-04-12 Thread Caitlin Potter
Caitlin Potter added the comment: Sorry Terry, gmail hides it by default, didn't notice. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17647 ___

[issue17647] subprocess.communicate() should preserve colored output on Windows

2013-04-07 Thread Richard Oudkerk
Richard Oudkerk added the comment: I don't see how this is a subprocess problem, or could be fixed in subprocess. IIUC, SetConsoleTextAttribute() only has an effect if the output is connected to a console. But that is not the case if you redirect the output to a pipe (which is presumably

[issue17647] subprocess.communicate() should preserve colored output on Windows

2013-04-07 Thread R. David Murray
R. David Murray added the comment: Oh, good, I thought that was probably the case but I don't know Windows enough to have been sure. Caitlin: if you can prove sbt and me wrong by writing a patch that works (without breaking anything else :), I think it would be considered. Certainly on unix

[issue17647] subprocess.communicate() should preserve colored output on Windows

2013-04-07 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 07/04/2013 7:21pm, R. David Murray wrote: Certainly on unix if you write ANSI color codes to stdout and the reader doesn't strip them, they will be preserved and can be redisplayed, so being able to do something similar on Windows would be nice. Although

[issue17647] subprocess.communicate() should preserve colored output on Windows

2013-04-07 Thread Caitlin Potter
Caitlin Potter added the comment: I'm not entirely positive that it would be doable, but looking at the subprocess code, it looks like we do have an open handle to the windows stdout buffer, including buffer attributes, so it should be possible to translate coloured attributes into ANSI codes,

[issue17647] subprocess.communicate() should preserve colored output on Windows

2013-04-07 Thread Caitlin Potter
Caitlin Potter added the comment: however I've tested this same test program in a development environment, *unix* development environment (xterm, ubuntu 12.04), rather. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17647

[issue17647] subprocess.communicate() should preserve colored output on Windows

2013-04-07 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 07/04/2013 9:02pm, Caitlin Potter wrote: I'm not entirely positive that it would be doable, but looking at the subprocess code, it looks like we do have an open handle to the windows stdout buffer, including buffer attributes, so it should be possible to

[issue17647] subprocess.communicate() should preserve colored output on Windows

2013-04-07 Thread Caitlin Potter
Caitlin Potter added the comment: Then perhaps nothing can be done from the python side of things, that's too bad. On Sun, Apr 7, 2013 at 4:38 PM, Richard Oudkerk rep...@bugs.python.orgwrote: Richard Oudkerk added the comment: On 07/04/2013 9:02pm, Caitlin Potter wrote: I'm not entirely

[issue17647] subprocess.communicate() should preserve colored output on Windows

2013-04-06 Thread Caitlin Potter
New submission from Caitlin Potter: In migrating from GNU autoconf/automake build systems to a python-based build system (Waf), I've been slightly annoyed that coloured text output from unit test programs is lost on the windows platform (the gtest framework uses ::SetConsoleTextAttribute on