Python 查看曾经用过的命令列表


如题。
Shell中用history查看,Python中什么命令查?

python

Kaedei 10 years, 1 month ago

如果你用的是 ipython 的话, 使用magic function: %history


 In [1]: import django

In [2]: %history
import django
%history

In [3]:

枣糕蒸河蟹 answered 10 years, 1 month ago

谢谢,但我现在在Windows下运行Python, 怎么查Python运行过的命令,只查本次启动后运行的也可以。

Alamith answered 10 years, 1 month ago

看一看这个博文,是不是能解决你的问题:
http://blog.csdn.net/imfinger/article/details/9398261

敲破一个碗 answered 10 years, 1 month ago

Your Answer