Accessing the spyder history log
Asked Answered
M

1

4

In spyder I often look back for code I wrote in the past, via the command :

%hist -g print if I want to see my print statements.

But recently most of my history disappeared and I only have access to codes I wrote in the last days.

I would like to manually access the history log, and have seen from multiple sources that it should be stored in a file 'history.py'. (e.g How to see the console history of all commands in the IPython console in Spyder).

I've gone through all the 'history.py' files I have and at most they define a class History but don't contain the actual codelines that I wrote in the past.

So my question is : Which file contains the history itself and how do I access it ?

Mclane answered 5/3, 2020 at 14:51 Comment(0)
D
7

(Spyder maintainer here) Spyder's history is available at

~/.spyder-py3/history.py

where ~ stands for your Users directory on macOS and Windows.

On a modern Linux distro this file is located at

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

Doubleton answered 10/3, 2020 at 23:12 Comment(2)
What about the history tab that was available next to the IPython console? I'm using Spyder 4.Spiritualize
@Spiritualize : Ctrl + Shift + L should open the history tab paneMourn

© 2022 - 2024 — McMap. All rights reserved.