记录使用的一些技巧处理python
局部的会话中使用code
若是想在当前 ipython 会话中使用,则运行 ipython 后,依次键入下面语句便可ip
%load_ext autoreload %autoreload 2
全局使用
若是想为了懒省事,我但愿 IPython 一直会自动重载,则须要修改io
/Users/allen/.ipython/profile_default/ipython_config.py
class
中的配置,修改以下:module
## lines of code to run at IPython startup. c.InteractiveShellApp.exec_lines = ['%autoreload 2'] ## A list of dotted module names of IPython extensions to load. c.InteractiveShellApp.extensions = ['autoreload']
若是当前用户目录下没有 .ipython
目录,则可执行如下语句建立配置
ipython profile create
file
持续更新...技巧