历史记录中的Python IDLE搜索(类似于bash中的Ctrl + R) [英] Python IDLE search in history (similar to Ctrl+R in bash)
问题描述
在IDLE ide中是否有与python等效的 Ctrl bash中的+ R ,您在其中键入行的一部分,并将其与已输入行的历史记录相匹配吗?
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?
推荐答案
这不如Ctrl + R,但是您可以键入一些起始文本,然后按Alt + P.
This is not as good as Ctrl+R, but you can type some of the starting text, and then press Alt+P.
因此,如果键入for
然后按Alt + P,它将找到以for
开头的最后一行,如果再次按它,则将找到以<开头的倒数第二行. c0>,依此类推.
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.
这仅允许您搜索以文本开头的行,而Ctrl + R则允许您在其中任何位置查找包含文本的行.
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.
这篇关于历史记录中的Python IDLE搜索(类似于bash中的Ctrl + R)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!