What is your favorite Python IDE?
Python is everywhere. These days, it seems it powers everything from major websites to desktop utilities to enterprise software. Python has been used to write all, or parts of, popular software projects like dnf/yum, OpenStack, OpenShot, Blender, Calibre, and even the original BitTorrent client.
It also happens to be one of my favorite programming languages. Personally, Python has been my go-to language through the years for everything from class projects in college to tiny scripts to help me automate recurring tasks. It's one of few languages out there that is both easy to get started with for beginners yet incredibly powerful when beginners graduate to working on real-world projects.
To edit Python programs, you have a number of options. Some people still prefer a basic text editor, like Emacs, VIM, or Gedit, all of which can be extended with features like syntax highlighting and autocomplete. But a lot of power users working on large projects with complex code bases prefer an integrated development environment (IDE) to the text editor plus terminal combination. The line between an advanced text editor and a slim IDE isn't always clear, and we'll leave it up to you to decide exactly which features you require for your development needs.
Let's look at some of the most popular options available to Python developers and see how they stack up. All three are cross-platform and can be used on your operating system of choice.
Eclipse with PyDev
It's hard to write anything about open source integrated development environments without covering Eclipse, which has a huge developer community and countless plugins available allowing you to customize it to meet nearly any need you can imagine. But this kitchen sink approach is also one of Eclipse's downsides. Many criticize it as bloated, and performance on low spec systems certainly can be an issue.
That said, if you're coming to Python from a background in a different language, particularly Java, Eclipse may already be your go to IDE. And if you make use of its many features, you may find life without them difficult.
PyDev adds a huge number of features to Eclipse, far beyond simple code highlighting. It handles code completion, integrates Python debugging, adds a token browser, refactoring tools, and much more. For those working with the popular Django Python web framework, PyDev will allow you to create new Django projects, execute Django actions via hotkeys, and use a separate run configuration just for Django.
Eclipse and PyDev are both made available under the Eclipse Public License.
Eric is my personal favorite IDE for Python editing. Named after Monty Python's Eric Idle, Eric is actually written in Python using the Qt framework.
The features of Eric are similar to other IDEs: brace matching, code completion, a class browser, integrated unit tests, etc. It also has a Qt form preview function, which is useful if you're developing a Qt GUI for your application, and I personally like the integrated task list function.
I've heard some criticisms of Eric's documentation, which primarily being delivered through a massive PDF does leave something to be desired, but if you take the time to learn it, I find Eric to be a lighweight yet full-featured programming environment.
Eric is made available under the GPL version 3.
PyCharm is another popular Python editor and rounds out my top three. Pycharm is a commercial product, but the makers also offer a community edition which is free and open source under the Apache 2.0 license.
PyCharm features pretty much everything one might hope for in an IDE: integrated unit testing, code inspection, integrated version control, code refactoring tools, a variety of tools for project navigation, as well as the highlighting and automated completion features you would expect with any IDE.
To me, the main drawback of PyCharm is its open core model. Many of PyCharm's advanced features are not available under an open source license, and for me, that's a deal breaker. However, if you're not looking to use the more advanced features included in the closed source verion, having the features left out may leave PyCharm as a lighter weight choice for Python editing.
Other great options
The list of open source Python editors and integrated development environments is lengthy. Here are a few other interesting standouts.
- PyScripter, LeoEditor, and PTK (the Python Tool Kit) are all lesser-known tools for working with Python code. And of course there's IDLE, the default IDE packaged with Python.
- Bluefish and Geany are two great general purpose IDEs with strong Python support.
- Spyder is an IDE specifically designed for working with scientific Python development and the libraries commonly associated with this type of work.
This is not a comprehensive list of Python editing solutions. For an (almost) comprehensive list, check out the Python Foundation's lists of integrated development environments and editors for Python. Did we miss your favorite? Let us know what it is in the comments below, and tell us why it's your top pick.