IPython-在输入历史记录中循环浏览块? [英] IPython - cycle through blocks in input history?
本文介绍了IPython-在输入历史记录中循环浏览块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
说我输入以下内容:
def foo():
print(2)
然后,当我想编辑函数时,按向上箭头键重写它,并且一次在输入中循环一行(即,首先显示print(2)
,然后按def foo():
).有什么方法可以像IDLE一样在代码块中循环吗?
Then later, when I want to edit my function, I press the Up arrow key to rewrite it, and that cycles through my inputs one line at a time (i.e. first it shows print(2)
, then def foo():
). Is there any way to make it cycle through blocks of code the way IDLE does it?
推荐答案
由于IPython停止使用readline,此问题又回来了,解决方案"是使用PageUp
和PageDown
代替C-up
和C-down
.
Since IPython has stopped using readline, this issue has come back, the "solution" is to use PageUp
and PageDown
instead C-up
and C-down
.
这篇关于IPython-在输入历史记录中循环浏览块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文