How do I access the command history from IDLE?

后端 未结 5 1620
梦如初夏
梦如初夏 2021-01-30 03:59

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\'

5条回答
  •  长情又很酷
    2021-01-30 04:19

    • I think you are looking for the history-previous action, which is bound to Alt+P by default.
    • You can remap it in "Options -> Configure IDLE -> Keys"
    • You can also access this command from the top menu in IDLE: "Shell -> Previous History"

    Incidentally, why don't you try a better (less ugly, for starters) shell like bpython or ipython?

提交回复
热议问题