Default/editable string to raw_input



Hi,

This is my first post to the list, I hope somebody can help me with this problem. Apologies if it has been posted before but I have been internet searching to no avail.

What I am trying to do is provide a simple method for a user to change a config file, for a test suite.
The config file consists of a number of keys, eg. build number, target device, etc.

What I would like to do is give the user a key, and the previous value for that key.
The user can then accept the previous value or edit it on the line.

I have a method where the previous value of a key is presented to the user and can be accepted if the user hits return. But as some of the values are somewhat long, and the user may only need to change 1 or 2 characters, it would be a nice feature to offer line editing.

I can get the readline.set_pre_input_hook() function to send text after a raw_input prompt, but this text cannot be edited.

Thanks in advance for any help.
Paraic.
.



Relevant Pages

  • Re: Default/editable string to raw_input
    ... This is my first post to the list, I hope somebody can help me with this ... Apologies if it has been posted before but I have been internet ... The config file consists of a number of keys, eg. build number, target ... really shouldn't be doing console I/O from multiple threads anyway). ...
    (comp.lang.python)
  • Re: 944 Turbo rear valance
    ... Apologies. ... Not only do I crosspost the OP, ... the whole of urh now knows what I ... > Not to mention that it wasn't your first post to urh. ...
    (uk.rec.humour)
  • Re: Location of my xf86config file
    ... >> Tried man XFree86 as well before my first post. ... Or maybe the permissions aren't correct. ... config file that is writable other than by its owner. ...
    (alt.os.linux)
  • 2.6.0-test5 atkbd.c: Unknown key (100% reproduceable)
    ... [My first post didn't make to the list. ... Apologies if it appears twice] ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: Non blocking spin lock..
    ... My apologies if this post appears twice. ... My first post didn't appear, ... background thread while i accessed the data. ...
    (comp.programming.threads)