This is a "follow-up" bug report as advised by Fernando Perez in the thread
http://thread.gmane.org/gmane.comp.python.ipython.user/2361/focus=2377
Cygwin IPython (meaning Python and GNU readline under Cygwin) shows the colour escape sequences as coloured faces in the output prompt. This happens in all Windows consoles.
The paradox thing is that prompt_in1 and prompt_in2 display fine - it's just prompt_out that has this mistake.
This is what I already found out:
Removing the \001/\002 from "class InputTermColors?" in ColorANSI.py solves the mistake (of course now readline doesn't wrap lines anymore so this is not the solution - just a hint where the problem lies)
This raises another interesting question: if the error lies in the class InputTermColors? why do the input prompts display fine but the output prompt is garbled?! I guess if we solve this problem then we have the solution for the problem.
I have discussed this problem in the Cygwin mailing list (because there were two other applications that had the same problem and I wondered whether readline is at fault)
The thread is at
http://news.gmane.org/find-root.php?message_id=%3cetlt2v%24aq0%241%
40sea.gmane.org%3e
Eric (the Cygwin readline maintainer) answered an pointed out the bugs in those two apps
Eric's answer is at
http://permalink.gmane.org/gmane.os.cygwin/88008
He couldn't correct the Python code but he guessed
"In other words, I wonder if IPython is adding extra \1
somewhere else in the sequence of things, which is then resulting in
the spurious \1 to the cmd terminal."
Thorsten