I'm creating a simple console application in python and I'd like to replicate the shell functionally where pressing the up or down key lets you cycle through previous commands.
I can easily store a list of previous commands but the hard part is catching up and down key presses. I have read that you can do this using a ui library like Qt but this seems overkill for such a simple thing.
Does anybody know of a lightweight and simple way to do this that uses no non standard modules?