Interactive session, alternating prompt. readline? curses?

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Sun Mar 25 15:53:55 EDT 2007


En Sun, 25 Mar 2007 14:04:09 -0300, Berend van Berkum <berend at dotmpe.com>  
escribió:

> I'm looking at building an interactive session in front of some
> rdfobj instances. I've used cmd and just found code.Interactive*.
>
> However, my question, can I change the "prompt" string in respond
> to user input using readline? AFAIK I'll need curses to do this?
> And colored prompts?

I've never used code.Interactive* and it looks like it interprets Python  
code, not arbitrary code.
Using cmd, you can set the prompt attribute. For colors, I think you may  
need curses or ncurses or similar...

-- 
Gabriel Genellina




More information about the Python-list mailing list