我正在使用 Django
shell_plus
。
readline
和 rlcompleter
模块安装在那里。
但我发现当我关闭我的 shell_plus session 时,我可以返回到我在之前的 session 中使用的历史命令。
在我的办公室里,我也可以返回到之前的命令。
我需要为此做什么
最佳答案
如果你使用 virtualenv,你可以使用 bpython 它启用了历史记录和许多其他奇妙的功能,用 pip 安装它。
pip install bpython
或全局
apt-get install bpython
对我来说,这是最令人惊叹的 python 交互式 shell。
关于python - 如何在 python 中的 Django shell 中启用历史记录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17377452/