I have a program which makes a change to a string, and then prompts the user to ask them if that change was correct. If it was not correct, they should be able to edit the string.
The problem is that while I can get the user's input from STDIN, I'd like the program to display the modified string and let the user use keys like BACKSPACE and the LEFT and RIGHT arrows to move about it in, and then change it, (a one-line text editor).
I suspect there's some technique or module that already does this. Can anyone point me in the right direction?
(PS: I hope this didn't get submitted twice. If so, sorry!)