Fork me on GitHub

Emacs

Emacs is an extensible text editor that can be customized by writing Lisp code.

Why is Emacs a good choice for Python coding?

Emacs is designed to be customized via the built-in Lisp interpreter and package manager. The package manager, named package.el, has menus for handling installation. The largest Lisp Package Archive is Melpa, which provides automatic updates from upstream sources.

Macros are useful for performing repetitive actions in Emacs. A macro is just a recording of a previous set of keystrokes that can be replayed to perform future actions.

Hooks, which are Lisp variables that hold lists of functions to call, provide an extension mechanism for Emacs. For example, kill-emacs-hook runs before exiting Emacs so functions can be loaded into that hook to perform necessary actions before the exiting completes.

While you're reading about coding Python in Emacs be sure to also learn about which web frameworks to use as well as how to deploy an application.

General Emacs resources

Notable Elisp Packages

  • Magit allows the user to inspect and modify Git repositories from within Emacs.

  • company-mode creates a modular in-buffer completion framework.

  • Flycheck provides syntax checking.

  • anaconda-mode is specific to Python development and allows code navigation, documentation lookup and code completion. The jedi library is used under the hood.

  • Tern is a stand-alone code-analysis engine for JavaScript. It can be integrated within a Django project via the tern-django package.

Popular user configurations

  • Prelude is an enhanced Emacs version 24 distribution.

  • A reasonable Emacs config shows a batteries-includes Emacs configuration bundle.

  • Emacs settings is a repository of configurations used in the Emacs Rocks screencasts.

  • Spacemacs mashes together Emacs' extensibility and Vim's ergonomic text editing features.

What's next once your development environment is set up?

Tell me about using the Vim editor for Python development.

I want to learn how to code a Python web application using a framework.

I want to know about working with data in Python.

Sign up here to receive a monthly email with major updates to this site, tutorials and discount codes for Python books.