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

Caitlin Potter report at bugs.python.org
Sun Apr 7 22:51:00 CEST 2013


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 <report at bugs.python.org>wrote:

>
> 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
> > translate coloured attributes into ANSI codes,
>
> The handle for stdout is just the readable end of a pipe.  It is not a
> console, GetConsoleScreenBufferInfo() will not work with it, and there
> are no coloured attributes associated with it.
>
> ----------
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue17647>
> _______________________________________
>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17647>
_______________________________________


More information about the Python-bugs-list mailing list