【问题标题】:Where does Jupyter QtConsole save its past commandsJupyter QtConsole 在哪里保存它过去的命令
【发布时间】:2020-02-07 01:46:05
【问题描述】:

如果我关闭 Jupyter QtConsole 的一个实例并打开一个新实例,请点击 Up 键。然后加载我上次运行的上一个命令。

过去的命令历史保存在哪个目录?

我查看了 Github 上的源代码,但没有找到。它似乎也不在jupyter --paths 中的任何路径中。

【问题讨论】:

    标签: python jupyter qtconsole


    【解决方案1】:

    通过源代码调用堆栈是这样的:

    HistoryConsoleWidget.history_previous()
    HistoryConsoleWidget._get_edited_history()
    HistoryConsoleWidget._set_history()
    JupyterWidget._handle_history_reply()
    

    找不到进一步的东西,所以认为这可能是 Jupyter 的事情。谷歌搜索这将我带到Where is the history file for ipython,实际上它存储在~/.ipython/profile_default/history.sqlite

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-09-20
      • 2016-09-07
      • 1970-01-01
      • 2014-03-31
      • 2023-02-17
      • 2011-10-08
      • 2016-09-26
      • 1970-01-01
      相关资源
      最近更新 更多