wxpython shell 启用向上箭头检索命令

wxpython shell enable uparrow to retrieve commands

我正在使用 wx.py.shell 中的 Shell,效果很好。但是如何启用 Python 提示,如向上箭头键功能。当我在 shell 中使用箭头键时,光标会上下移动,而我希望它逐步执行最后的命令。

我从文档中看到 http://www.wxpython.org/docs/api/wx.py.shell.Shell-class.html#OnHistoryInsert,它确实跟踪历史记录,但如何启用它以使用箭头键检索?

使用 Ctrl-箭头。 F1 键将向您显示一些其他特殊键绑定。