I am writing a short python script to read line from stdin, but when I run it and press keys like home, end, left, right, it doesn’t work, it prints the key on the line instead.
I also want to have the feature “up/down” to view history of editing, just like the python interactive console.
Is there an easy way to do this? I tried getch and curses, but seems not easy to do this. trying curses which tangles up my command line window.
Use the GNU readline interface.