【发布时间】:2012-10-26 09:24:27
【问题描述】:
我尝试将自动重载设置为我的开发过程,但我从that 线程中学到的方法似乎不适用于我的版本。 我试过了
- ipython -V: 0.10 和 python -V Python 2.6.6
- ipython -V: 0.10.1 和 python -V Python 2.7.3
但是
%load_ext autoreload
%autoreload 2
返回
ERROR: Magic function `load_ext` not found.
这很明显,因为
In [1]: %lsmagic
Available magic functions:
%Exit %Pprint %Quit %alias %autocall %autoindent %automagic %bg %bookmark %cd %clear %color_info %colors %cpaste %debug %dhist %dirs %doctest_mode %ed %edit %env %exit %hist %history %logoff %logon %logstart %logstate %logstop %lsmagic %macro %magic %p %page %paste %pdb %pdef %pdoc %pfile %pinfo %popd %profile %prun %psearch %psource %pushd %pwd %pycat %quickref %quit %r %rehash %rehashx %rep %reset %run %runlog %save %sc %store %sx %system_verbose %time %timeit %unalias %upgrade %who %who_ls %whos %xmode
此方法不可用。如何安装其他魔术功能?
【问题讨论】:
-
你不能安装新的ipython?
-
我应该安装哪一个?我的easy_install 说
sudo easy_install ipython Searching for ipython Best match: ipython 0.10.1 -
根据this,
%autoreload在ipython 0.11的quarantine directory中,在0.12版本中完全可用。