[IPython-user] [IPython-dev] bug in coloured prompt

Thorsten Kampe thorsten@thorstenkampe...
Thu Apr 5 02:46:51 CDT 2007


* Fernando Perez (Wed, 4 Apr 2007 10:36:35 -0600)
> On 4/4/07, Thorsten Kampe <thorsten@thorstenkampe.de> wrote:
> > > We do have enough Win32 users that if you can find a patch that makes
> > > all combinations of terminals and environments under win32 work
> > > correctly, I'm sure it will be very welcome.
> >
> > To be honest I don't think a patch to IPython would make sense. Other
> > applications have the same problem (lftp and yafc for instance) - and
> > probably the same cause for the problem. It wouldn't make sense to
> > patch all these apps. The only thing these applications have in common
> > is that they use Cygwin readline. I guess we have to patch readline.
> 
> Well, IPython already has tons of workaround code to make sure users
> get the right experience even in the face of limitations in
> third-party code (bugs in python itself, windows, etc.).  So I would
> not be against including something similar to help here, if it can be
> made robustly.
> 
> But obviously if you can have Cygwin fixed for good, that's even better :)

I now received an answer from Eric Blake, the Cygwin readline 
maintainer. Basically he says that the Prompt code in IPython (and the 
other applications that have the problem) is buggy. Here's his main 
statement:

> In other words, the common bug in all three programs you mentioned
> is that they copied bash's escape sequences, but NOT bash's round of
> internal expansion, prior to calling readline. 
> [...]
> Just because most other terminals (rxvt, xterm, ...) are tolerant of
> unknown control characters, and treat spurious invisible \001 as
> non-printing characters, doesn't mean that lftp, yafc, or IPython
> should assume that all terminals behave that way.

Could you have a look at this and see whether he's right or wrong?

The thread is at
http://news.gmane.org/find-root.php?message_id=%3cetlt2v%24aq0%241%
40sea.gmane.org%3e

Eric's answer is at
http://permalink.gmane.org/gmane.os.cygwin/88008


Thorsten



More information about the IPython-user mailing list