[IPython-dev] [IPython-user] bug in coloured prompt
Fri Apr 6 11:53:55 CDT 2007
On 4/6/07, Thorsten Kampe <firstname.lastname@example.org> wrote:
> I still think that the problem could be quite simple. Just one more
> question and I will stop nagging and being a PITA:
> 1. Does IPython wrap the colour prompt
> a) just in a single "\001invisible\002plain" or
> b) in something like "\001\001invisible\001\002plain"?
> 2. If b) then where does that happen in the source code?
the code is:
Normal = '\001\033[0m\002' # Reset normal coloring
_base = '\001\033[%sm\002' # Template for all other colors
This is a template, where *each* ANSI escape is expanded (that's the
%s part) to form actual color schemes (that code comes right after).
This module builds the classes for color handling, and the explicit
color schemes are built where needed (see Prompts.py for prompt
colors, excolors for exception colors and PyColorize for source
More information about the IPython-dev