History#
With the History pane, you can view the recent code and commands you’ve entered into any IPython Console, along with their timestamp.
Using the History pane#
Navigating the History pane is very straightforward. Each Spyder session is marked by a date and timestamp, making it easy to remember when you executed a certain command. Statements can be selected and copied from the context menu or with the normal system shortcuts. Just like in the Editor, selecting a word or phrase displays all other occurrences, and full syntax highlighting is also supported. The last ≈1000 lines entered are stored in the pane.
Advanced usage#
The list of commands shown in the History pane are stored in history.py
in the .spyder-py3
directory in your user home folder (by default, C:/Users/username
on Windows, /Users/username
for macOS, and typically /home/username
on GNU/Linux).
You might need to show invisible files in order to see it on a non-Windows operating system.
While there is currently no built-in way to clear history from the Spyder interface aside from resetting preferences, you can do so by closing Spyder, deleting this file and restarting Spyder again.