[IPython-user] Prompt expressions

Walter Dörwald walter at livinglogic.de
Thu Jun 15 16:09:53 CDT 2006

Ville Vainio wrote:
> On 6/15/06, Walter Dörwald <walter at livinglogic.de> wrote:
>> > If you want to play with this right now (put an example in wiki if you
>> > do), try composing a string with color escape sequences from
>> > ColorANSI.InputTermColors like in Prompts.py
>> Done:
>> http://projects.scipy.org/ipython/ipython/wiki/CookBook#Definingpromptviahooks 
>> I'm pretty sure that this is not the canonical code to get escape
>> sequences. Feel free to enhance the example.
> Good stuff.
> I cleaned it up a little bit.

Great! I've added a matching output prompt example.

BTW, should we endorse the "ip = self.api" "trick" that the code uses?


More information about the IPython-user mailing list