magic命令%edit应该在iPython中调用IDLE

时间:2013-02-13 20:09:31

标签: python ipython python-idle

在iPython中执行%edit时,是否可以在linux中打开IDLE而不是默认的vi? 怎么样?

1 个答案:

答案 0 :(得分:3)

摘自%edit?

%edit runs IPython's editor hook. The default version of this hook is
set to call the editor specified by your $EDITOR environment variable.
If this isn't found, it will default to vi under Linux/Unix and to
notepad under Windows. See the end of this docstring for how to change
the editor hook.

You can also set the value of this editor via the
``TerminalInteractiveShell.editor`` option in your configuration file.
This is useful if you wish to use a different editor from your typical
default with IPython (and for Windows users who typically don't set
environment variables).

....

所以我猜你可以在$ EDITOR或.ipython / profile_xxx / [right configfile]中设置IDLE .py