Interactive session, alternating prompt. readline? curses?

B

Berend van Berkum

Hi all,

I'm looking at building an interactive session in front of some
rdfobj instances. I've used cmd and just found code.Interactive*.

Protocol doesn't matter, I'm looking at the UI possibilities.
History is nice to have and my intention is to write output of
the session to stdin/stderr.

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?

Example: the prompt, say '>>>', would change depending on wether
I type '<', '@' or ':' (and autocompletion libraries change too) .

I sometimes see some fancy shell output ('percentage loaded'-bars,
etc) and I'm wondering how to do this with python and what it does
to stdout. Any pointers?


regards, Berend

PS: please cc, I'm not on list
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top