IPython 自动重载魔术

在开启IPython 后输入下列命令就可以开启Ipython 的自动重载

%load_ext autoreload
%autoreload 2
  • 当你在IPython中导入的函数或类发生修改时,IPython 会自动重新导入相关代码。
  • 这样就不用没改一次代码重启一次交互shell了。

查看 autoreload 的状态

%autoreload?
posted @ 2018-11-11 01:35  暮晨  阅读(715)  评论(0编辑  收藏  举报

Aaron Swartz was and will always be a hero