delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
To: | cygwin AT cygwin DOT com |
From: | Thorsten Kampe <thorsten AT thorstenkampe DOT de> |
Subject: | Re: Escape colour codes |
Date: | Thu, 5 Apr 2007 08:30:59 +0100 |
Lines: | 33 |
Message-ID: | <ev28jj$t91$1@sea.gmane.org> |
References: | <etlt2v$aq0$1 AT sea DOT gmane DOT org> <euuhri$f63$1 AT sea DOT gmane DOT org> <euuih2$iro$1 AT sea DOT gmane DOT org> <euvkme$hv0$1 AT sea DOT gmane DOT org> <4613A562 DOT 5090806 AT byu DOT net> <ev0ff8$bbu$1 AT sea DOT gmane DOT org> <loom DOT 20070404T212717-932 AT post DOT gmane DOT org> |
Mime-Version: | 1.0 |
User-Agent: | MicroPlanet-Gravity/2.70.2067 |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
* Eric Blake (Wed, 4 Apr 2007 19:50:24 +0000 (UTC)) > Thorsten Kampe <thorsten <at> thorstenkampe.de> writes: > > 9. Install Python and IPython (http://ipython.scipy.org/moin/) > > set > > prompt_in1 '\C_White[\#\C_White]\C_LightCyan>>> ' > > prompt_out '\C_White[\N\C_White] ' > > in your ipythonrc and start IPython. Type 1 [Enter] > > The bug is in IPython. > > > 12. Remove the \001/\002 constructs in line 88 and 89 from > > ColorANSI.py in Cygwin IPython > > > > from > > Normal = '\001\033[0m\002' # Reset normal coloring > > _base = '\001\033[%sm\002' # Template for all other colors > > > > to > > > > Normal = '\033[0m' # Reset normal coloring > > _base = '\033[%sm' # Template for all other colors > > I'm not sure if this is correct. If you pass invisible characters to readline > without marking them as such, using \1 and \2, then readline messes up the > display width. The "from" is the original code, the "to" is my modification to show that omitting the \001/\002 constructs will make IPython not show the colour escape codes. Of course this wasn't meant as a solution because the escapes are there for a reason (as you correctly pointed out). Simply removing them will just introduce a new kind of problem. Thorsten -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |