使用魔术" ed"在IPython之后没有运行脚本

时间:2014-07-25 14:41:22

标签: editor ipython

当我在IPython中使用ed时,我在关闭编辑器后运行了脚本。是否可以在IPython中编辑而不在之后运行?

实际上,我希望有这两种选择。

1 个答案:

答案 0 :(得分:2)

使用%edit -x

[1]: %edit? 

-x: do not execute the edited code immediately upon exit. This is 
mainly useful if you are editing programs which need to be called with
command line arguments, which you can then do using %run.