How can I get the last raw_input? My py asks questions(raw_input) and if user types wrong asks the same again and user needs to type all over again, so how can I get last input to make de user just edit it??(like a shell pressing key-up)
Python user input replay
805 Views Asked by mont_ At
2
There are 2 best solutions below
0

Use the readline
module.
import readline
# Everything magically works now!
There are more sophisticated features available if you want tab completion and other goodies.
You are looking for the
readline
module. Here's an example from effbot.org: