Simple input loop
while True:
query = input('> ')
results = get_results(query)
print(results)
Doesn't allow me to use arrow keys to
- Move cursor backwards through entered text to change something
- Press up arrow to get entries entered in the past
- Press down arrow to move in the opposite direction to (2)
Instead it just prints all the escape codes:
> my query^[[C^[[D^[[D^[[D^[[A^[[A^[[A
How can I make it behave like a REPL or shell prompt?