IPython Documentation

Table Of Contents

Previous topic

Module: lib.demo

Next topic

Module: lib.guisupport

This Page

Note

This documentation is for a development version of IPython. There may be significant differences from the latest stable 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)

Parameters:

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 invokation 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.

IPython.lib.editorhooks.komodo(exe=u'komodo')

Activestate Komodo [Edit]

IPython.lib.editorhooks.scite(exe=u'scite')

SciTE or Sc1

IPython.lib.editorhooks.notepadplusplus(exe=u'notepad++')

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

IPython.lib.editorhooks.jed(exe=u'jed')

JED, the lightweight emacsish editor

IPython.lib.editorhooks.idle(exe=u'idle')

Idle, the editor bundled with python

Parameters:

exe : str, None

If none, should be pretty smart about finding the executable.

IPython.lib.editorhooks.mate(exe=u'mate')

TextMate, the missing editor

IPython.lib.editorhooks.emacs(exe=u'emacs')
IPython.lib.editorhooks.gnuclient(exe=u'gnuclient')
IPython.lib.editorhooks.crimson_editor(exe=u'cedt.exe')
IPython.lib.editorhooks.kate(exe=u'kate')