Open CMCDragonkai opened 7 years ago
I tested this just now, and the issue didn't reproduce for me.
@CMCDragonkai Are you using ConEmu? I am able to reproduce the issue with ConEmu and the Cygwin connector. The ConEmuANSI
variable ends up set to ON
in the hidden winpty console even though the ConEmu hook is not present (and therefore doesn't provide support for ANSI escape sequences).
I'm guessing ipython uses prompt_toolkit, which decides its output is ConEmu by looking for ConEmuANSI=ON
here: https://github.com/jonathanslenders/python-prompt-toolkit/blob/021e6cc963570e1bc645defcdeb2da10d0c83a9e/prompt_toolkit/utils.py#L190
Yep using CONEMU and Cygwin
I considered having winpty clear ConEmu environment variables only when it detected the presence of the ConEmu hook DLL, but that's too conservative a fix -- it's possible for (a) ConEmu to set those variables, then (b) ConEmu starts some other process unhooked, then (c) some descendant eventually starts winpty.exe
.
Running iPython3 with winpty gives something like this: