Gradle seems to change external processes color printings

I have a gradle task that runs a python process by gradle Exec().
I run on Windows 7, cygwin terminal.

When I run my python program directly on the terminal, I see nice ANSI colors the python prints to stdout.
However, when I run the python from gradle Exec(), its colors are dramatically changing.
For example the bright yellow becomes a kind of “mustard”.
The gradle colored messages like “task” bright white are looking fine. Only the python colors change.
It seems like gradle captures the stdout and stderr from Exec and modify them somehow.

Any workaround, to see both gradle and python nice?
if not, can I see python colors nice and skip the gradle colors (most of debugging info comes from the external python).


A possible workaround is running gradle with the –console plain command line argument. It disables the colored and non-streamed output. As a result your python output should be back to normal.

Thanks @hdecarne , but this is not working.
with console=plain, I don’t get colors neither in gradle nor in python.
The python color Ansi are just printed.