def remove_item(self, index):
# readline.remove_history_item() doesn't seem to work. Do it the
# hard way.
#try:
# readline.remove_history_item(i)
#except ValueError:
# pass
buf = []
for i in range(1, self.total + 1):
if i != index:
buf += self.get_item(i)
self.clear_history()
for s in buf:
readline.add_history(s)
history.py 文件源码
python
阅读 29
收藏 0
点赞 0
评论 0
评论列表
文章目录