On bash or Window\'s Command Prompt, we can press the up arrow on keyboard to get the last command, and edit it, and press ENTER again to see the result.
But in Python\'
Go into Preferences > Keys. Find the 'history-previous' selection in the list and edit it to Up Arrow.
If you're on mac, it's ctrl+p.
You can always edit the file config-keys.cfg found under ~/.idlerc by default; look for the entry "history-previous" and set it to as below...
history-previous = <Key-Up>
Done.
history-previous
action, which is
bound to Alt+P by default.Incidentally, why don't you try a better (less ugly, for starters) shell like bpython or ipython?
just use Alt+P
to go up. Similarly, Alt+N
could be used to go down.