【问题标题】:Accessing the spyder history log访问 spyder 历史日志
【发布时间】:2020-03-11 07:12:10
【问题描述】:

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

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

但最近我的大部分历史都消失了,我只能访问我在最后几天编写的代码。

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

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

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

【问题讨论】:

    标签: python spyder history


    【解决方案1】:

    (这里是 Spyder 的维护者) Spyder 的历史可以在

    ~/.spyder-py3/history.py

    ~ 代表 macOS 和 Windows 上的用户目录。

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

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

    【讨论】:

    • IPython 控制台旁边的历史记录选项卡怎么样?我正在使用 Spyder 4。
    • @Zizzipupp : Ctrl + Shift + L 应该打开历史标签窗格
    猜你喜欢
    • 1970-01-01
    • 2017-08-27
    • 2011-08-10
    • 1970-01-01
    • 2011-09-05
    • 1970-01-01
    • 1970-01-01
    • 2012-06-18
    • 1970-01-01
    相关资源
    最近更新 更多