Skip to main content

Use your CLI text editor from within the Python REPL.

Project description

EditREPL is a port of Giles Bowkett’s InteractiveEditor component from his ruby gem Utility Belt.

EditREPL allows you to run a terminal based editor inside your REPL session to interactively edit code.

video preview



Installation is easy using either pip or easy_install.

easy_install EditREPL
pip install EditREPL

Supported Environments

EditREPL is Python2 and Python3 compatible with the default interactive shell.

Basic Usage

To include it in your session, import the module and call the editor function:

import editrepl

After you save, the buffer will be executed in the current REPL context.

Advanced Usage

Can I edit any file?

Yes, just call the editor function with the filename you want to edit.


How does EditREPL choose your editor?

By default it uses the editor defined as your EDITOR environment variable, but if that isn’t defined it tries the following editors in order:

["vim", "vi", "emacs", "nano", "pico", "ed"]

Can I change my editor?

To manually set your editor after initialization, supply the name or full path to the executable as follows:

ER.editor = "cli-textmate"

This will create a binding to the function cli-textmate for you to call.

What REPLs does it work with?

Only the default python interpreter. iPython and bPython are confirmed to not work.

How does it work?

Check out the literate code here or clone the repo and checkout out the docs folder.


By Philip Bjorge


  • rpk512

Released under BSD License

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for EditREPL, version 2013.06.20
Filename, size File type Python version Upload date Hashes
Filename, size EditREPL-2013.06.20.tar.gz (7.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page