Python IDLE search in history (similar to Ctrl+R in bash)

一世执手 提交于 2020-01-04 07:53:09

问题


Is there an equivalent in the IDLE ide for python to Ctrl+R in bash, where you type a part of the line, and it matches it against the history of already entered lines?


回答1:


This is not as good as Ctrl+R, but you can type some of the starting text, and then press Alt+P.

So if you type for and then press Alt+P, it will find the last line that starts with for, if you press it again, it will find the next-to-last line that starts with for, and so on.

This only allows you to search for lines starting with the text, however, while Ctrl+R allows you to find lines containing the text anywhere in them.



来源:https://stackoverflow.com/questions/17335865/python-idle-search-in-history-similar-to-ctrlr-in-bash

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!