如何在Spyder的IPython控制台中查看所有命令的控制台历史记录

AlK*_*AlK 2 console stack ipython spyder

在 Spyder 的 IPython 控制台中,我只能看到最新执行的命令——因为前者从控制台窗口中消失了。

我想知道是否有某种方法——例如通过调整一些参数——来查看 Spyder 中 IPython 控制台中所有命令的控制台历史记录。

你可以帮帮我吗?谢谢!

ato*_*3ls 8

如果您%quickref在 Ipython 控制台中键入,您将看到如下所示的一个部分:

History:

_i, _ii, _iii    : Previous, next previous, next next previous input
_i4, _ih[2:5]    : Input history line 4, lines 2-4
exec _i81        : Execute input history line #81 again
%rep 81          : Edit input history line #81
_, __, ___       : previous, next previous, next next previous output
_dh              : Directory history
_oh              : Output history
%hist            : Command history of current session.
%hist -g foo     : Search command history of (almost) all sessions for 'foo'.
%hist -g         : Command history of (almost) all sessions.
%hist 1/2-8      : Command history containing lines 2-8 of session 1.
%hist 1/ ~2/     : Command history of session 1 and 2 sessions before current.
%hist ~8/1-~6/5  : Command history from line 1 of 8 sessions ago to
                   line 5 of 6 sessions ago.
%edit 0/         : Open editor to execute code with history of current session.
Run Code Online (Sandbox Code Playgroud)

这些命令之一应该做你想做的......