editor
đź–‹ Open the default text editor đź–‹
What it is and what it does
editor is a thin wrapper around your system's text editor that lets you spawn an interactive editing session from Python code. It detects and launches your preferred editor (via VISUAL or EDITOR environment variables, or platform defaults like Notepad on Windows or vim elsewhere), blocks while you edit, then returns the file contents back to your program. You can edit an existing file, create a new one, or work with a temporary buffer that gets cleaned up automatically.
The package is useful in CLI tools, interactive scripts, or any application that needs user input through a familiar text editor rather than stdin. It has minimal dependencies (runs and xmod) and supports current Python versions (3.10–3.14), making it straightforward to integrate into existing projects.
Use it for:
- Collect multi-line user input in a CLI tool by opening the user's preferred editor.
- Let users edit configuration or data files interactively from within a Python script.
- Implement a 'compose' feature in a terminal application that spawns vim or another editor.
- Capture detailed feedback or comments by opening an editor with pre-filled template text.
- Build interactive workflows where editing a file is more natural than command-line prompts.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Opens your system's default text editor (or a specified one) to edit a file or temporary buffer, blocks until editing is complete, and returns the edited content.
Yes. The package solves a specific, real problem (spawning an editor and capturing its output) with minimal dependencies, active maintenance, permissive licensing, and no known vulnerabilities. Install it if you need interactive text editing in a Python application; skip it if your use case is purely programmatic file manipulation.
Install
editor on PyPI
pip
pip install editoruv
uv add editorpoetry
poetry add editorInstalling editor
Before you install
Low install friction with only two runtime dependencies (runs and xmod). Actively maintained with a recent release (97 days ago) and current Python version support (3.10–3.14).
License in practice
MIT license permits unrestricted use, modification, and distribution with only attribution required.
Quickstart
import editor
# Edit a temporary file and get the result
comments = editor.editor(text='Initial text\n\n')
# Or edit a named file
comments = editor.editor(filename='file.txt', editor='vim')
Requires Python 3.10 or later. The editor subprocess will block until the user closes the editor window.
Verify before relying
- Whether the package handles editor launch failures gracefully or what exceptions are raised.
- Whether temporary files are reliably cleaned up in all error scenarios.
- Cross-platform behavior on systems where VISUAL and EDITOR are not set and the OS is neither Windows nor Unix-like.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — runs, xmod |
| Maintenance | actively maintained — 97 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,904,859/month — #2,203 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: editor-1.8.0-py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
bcsfeA command-line save file editor for The Battle…
copyleft · top 15,000 on PyPI
python-editorProgrammatically open your system's $EDITOR…
permissive · top 5,000 on PyPI
pyvimA Vi/Vim-like text editor implemented entirely…
permissive · top 15,000 on PyPI
memory-tempfileIdentifies and provides access to RAM-based…
permissive · top 15,000 on PyPI
in-placeProvides an InPlace class for reading and…
permissive · top 15,000 on PyPI
blurbblurb is a command-line tool that manages…
permissive · top 15,000 on PyPI
streamlit-quillEmbeds a React Quill rich-text editor component…
unclear · top 15,000 on PyPI
djangocms-text-ckeditorIntegrates CKEditor (v4.17.2) as a text editing…
permissive · top 15,000 on PyPI
streamlit-aceEmbeds an Ace code editor component into…
permissive · top 15,000 on PyPI
OpenTimelineIOOpenTimelineIO provides an interchange format…
permissive · top 15,000 on PyPI