# Emacs: The Best Python Editor?

DevFeed: [Emacs: The Best Python Editor?](<https://devfeed.tech/articles/emacs-the-best-python-editor-95791.md>)

Original publisher: [Read original article](<https://realpython.com/emacs-the-best-python-editor/>)

Author: Jon Fincher

Published: 2026-10-22T14:00:00Z

Content type: tutorial

Language: en

Sources: [Real Python](<https://devfeed.tech/sources/real-python.md>)

Topics: [Emacs](<https://devfeed.tech/topics/emacs.md>), [Python](<https://devfeed.tech/topics/python.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>), [IPython](<https://devfeed.tech/topics/ipython.md>), [versioning](<https://devfeed.tech/topics/versioning.md>)

Tags: [configure](<https://devfeed.tech/tags/configure.md>), [debug](<https://devfeed.tech/tags/debug.md>), [editor](<https://devfeed.tech/tags/editor.md>), [emacs](<https://devfeed.tech/tags/emacs.md>), [install](<https://devfeed.tech/tags/install.md>), [python](<https://devfeed.tech/tags/python.md>), [run](<https://devfeed.tech/tags/run.md>), [test](<https://devfeed.tech/tags/test.md>), [write](<https://devfeed.tech/tags/write.md>)

## AI overview

The tutorial shows how to configure GNU Emacs for Python work, from creating an initialization file and installing packages through running, testing, debugging, and managing code with Git. Built-in `python-mode` offers indentation and syntax highlighting; `elpy` adds completion, syntax checking, REPL and virtual environment support, but is no longer actively maintained. For Emacs 29 or later, the tutorial presents Eglot with a Python language server as an alternative and cautions that running both setups may duplicate or override features. It also covers `flycheck` for live diagnostics, `autopep8` or `black` formatting, and `ein` for Jupyter notebooks. The guide requires GNU Emacs 26 or later and an installed Python distribution; most techniques are said to work on older versions and XEmacs.

## Source excerpt

Install and configure Emacs for Python development, then write, run, test, and debug your Python code without leaving the editor.