This documentation covers a development version of IPython. The development version may differ significantly from the latest stable release.


This documentation covers IPython versions 6.0 and higher. Beginning with version 6.0, IPython stopped supporting compatibility with Python versions lower than 3.3 including all versions of Python 2.7.

If you are looking for an IPython version compatible with Python 2.7, please use the IPython 5.x LTS release and refer to its documentation (LTS is the long term support release).

Module: lib.editorhooks

‘editor’ hooks for common editors that work well with ipython

They should honor the line number argument, at least.

Contributions are very welcome.

11 Functions

IPython.lib.editorhooks.install_editor(template, wait=False)

Installs the editor that is called by IPython for the %edit magic.

This overrides the default editor, which is generally set by your EDITOR environment variable or is notepad (windows) or vi (linux). By supplying a template string run_template, you can control how the editor is invoked by IPython – (e.g. the format in which it accepts command line options)

  • template (basestring) – run_template acts as a template for how your editor is invoked by the shell. It should contain ‘{filename}’, which will be replaced on invocation with the file name, and ‘{line}’, $line by line number (or 0) to invoke the file with.
  • wait (bool) – If wait is true, wait until the user presses enter before returning, to facilitate non-blocking editors that exit immediately after the call.

Activestate Komodo [Edit]


SciTE or Sc1


Notepad++ http://notepad-plus.sourceforge.net


JED, the lightweight emacsish editor


Idle, the editor bundled with python

Parameters:exe (str, None) – If none, should be pretty smart about finding the executable.

TextMate, the missing editor