访问间谍历史记录

时间:2020-03-05 14:51:34

标签: python spyder history

在spyder中,我经常通过命令来回顾我过去编写的代码:

%hist -g print,如果我想查看打印语句。

但是最近我的大部分历史都消失了,我只能使用最近几天写的代码。

我想手动访问历史记录日志,并且从多个来源看到它应该存储在文件'history.py'中。 (例如How to see the console history of all commands in the IPython console in Spyder)。

我已经遍历了所有的“ history.py”文件,它们最多定义了一个“历史”类,但是不包含我过去编写的实际代码行。

所以我的问题是:哪个文件包含历史记录本身,如何访问它?

1 个答案:

答案 0 :(得分:4)

(此处为 Spyder维护者),可以在以下位置找到Spyder的历史记录

~/.spyder-py3/history.py

其中~代表您在macOS和Windows上的Users目录。

在现代Linux发行版中,此文件位于

~/.config/spyder-py3/history.py

相关问题