Until recently, I hadn’t looked into Python IDEs for several years; I’m not generally an IDE person — I usually use Emacs. When I last checked them out, Python IDEs were a dismal lot; it’s not easy to write tools for a dynamic language, because they have to analyze the code, and a lot of its behavior is hard to predict before runtime. Now, however, one point has become especially evident to me: Python IDEs have improved greatly. If I were starting out as a Python programmer today, I might well choose an IDE — some of them are really impressive. I’ve tested and reviewed many of them, so below you’ll find a comparison of Python IDEs in alphabetical order:
- Eclipse with PyDev
- Eric
- IDLE
- Komodo IDE
- PyCharm
- Wing IDE
Eclipse with PyDev
Full disclosure: the word “Eclipse” in a programming context (or a literary one, for that matter) fills me with dread; in my mind, Eclipse is a pig strapped to a dog strapped to a whale. I’m reluctant to install Eclipse because it’s such a large application; some would say bloated. In view of that, I’m somewhat biased against PyDev — but I’ve tried to evaluate it fairly, and it impressed me much more than I expected.
- Text Editors vs IDEs for Python development: Selecting the Right Tool
- Best Text Editors for Python Development
- Introduction to SQLite in Python
Installation of PyDev is a little more involved than many of the IDEs reviewed here because Eclipse must be installed separately. Then, Eclipse must be closed and run as an administrator, you must add the software source for PyDev, accept its certificate, and wait while the plugin installs. Then you must restart Eclipse as a normal user. (Excellent instructions are available from pydev.org.)
My initial reaction was that it’s good, but somewhat cumbersome. Code navigation is well-done and effective, and auto-indentation and de-indentation works beautifully. Auto-completion works well and makes excellent suggestions, but the user-interaction implementation is awkward; in some circumstances, for example, if you have a list narrowed down to a single suggestion and you want to type something else, you have to hit Escape to get out of the auto-completion list, moving your hands out of their typing position. Creating a new Python file in a project sometimes takes several seconds, for some reason. There is code folding available for classes and functions, but for some reason not for any other kind of block. The debugger works fine, but its user interface — it opens a different debugging view rather than integrating debugging into the regular PyDev view — is just more scattered than it needs to be, with extra chrome everywhere making available space so small that you have to scroll around to see everything.
PyDev does have something few of the other IDEs here have, which is remote debugging; if that’s important to you, you’ll have to use Emacs or PyDev, which are the only realistic options I found that have it.
Eclipse and PyDev make a pretty good IDE on the whole. If you’re an IDE person already accustomed to Eclipse, and you like it, I’d give PyDev a try so you can use a tool you’re already comfortable with. If Eclipse isn’t important to you, but you want an IDE, I’d try PyCharm, which offers all the same features in a cleaner, faster, better thought-out package; still, PyDev is not a bad choice.
Eric
Eric is an IDE written in Python with PyQt. It integrates some familiar Qt tools, such as Designer and Linguist, uses the ubiquitous Scintilla editing component, and has some tools that look like they would be really useful.
That’s about where I end with Eric, because it has a very serious drawback: it has a very complex interface with low discoverability and very little documentation. It feels like it was designed to make the user feel stupid and impotent. Where I was able to drop right in and use other editors and IDEs on this list, and consult the documents for the bits that weren’t obvious, Eric stymied me at every turn, and though its plugin API is documented (by a tool, I think), there are no user docs included. None. Zero docs.
You will no doubt forgive the tone of frustration in this review.
Auto-completion didn’t appear to be turned on at first, so I dug through the preferences and enabled it in two places, which I think was necessary. It was awful — ludicrously bad, in fact, so I searched and found references to alternate plugins for auto-completion. I installed one of those, based on Rope, went through the preferences to enable that, found change but no improvement — and gave up in disgust.
Auto-indentation is barely acceptable. The GUI designer, Qt’s Designer, is good enough, but good luck finding it. Hint: it’s not in the menus. Debugging works, and claims to be able to debug remotely, though I didn’t test it. Oh, it’s disabled in the preferences.
Refactoring? Don’t know if it works; I never saw the menu become enabled. Maybe it’s disabled in the preferences too, but I couldn’t find a setting for it. There are extensive customization options for the totally useless help viewer, though, if that helps.
I’ve seen dog turds with a better user experience than Eric.
IDLE
IDLE comes with most distributions of Python, and describes itself as “the Python IDE built with the tkinter GUI toolkit.” It advertises the following features:
- Coded in 100% pure Python, using the Tkinter GUI toolkit.
- Cross-platform: works on Windows, Mac and Linux/Unix.
- Multi-window text editor with multiple undo, Python colorizing and many other features, e.g. smart indent and call tips.
- Python shell window (a.k.a. interactive interpreter).
- Debugger (not complete, but you can set breakpoints, view and step).
All those features are in fact present, but they do not really make an IDE. In fact, while IDLE offers some of the features you expect from an IDE, it does so without even being a satisfactory text editor. The interface is buggy and fails to take into account how Python works, especially in the interactive shell, the auto-completion is useless outside the standard library, and the editing functionality is so limited that no serious Python programmer — heck, no serious
typist — could use it full-time.
If you use an IDE, it should not be IDLE.
Komodo IDE
ActiveState supplies an excellent distribution of Python with “extra batteries”, and their distributions of Perl and Tcl are also fine, but they should leave the Python IDE business to others. To pay $295 for Komodo IDE would be outrageous; it does little that PyDev won’t do for free or PyCharm for much less money, and much of what it does do only nominally works, at least out of the box on Ubuntu.
To be perfectly fair, they are engaged in a more difficult task than the developers of most IDEs reviewed here: Komodo IDE also provides editing and code completion for CSS, HTML, JavaScript, PHP, Perl, Ruby, Tcl, XML, XSLT, XUL, and various templating languages. I didn’t test any of those, though I read that their JavaScript support is exceptional. Still, that doesn’t help you write Python.
PyCharm
PyCharm is built by JetBrains, the people behind IntelliJ IDEA, WebStorm, RubyMine, and other powerful single-language IDEs. They certainly know IDEs, and their experience shows with PyCharm. It’s a polished, powerful, versatile IDE that works well and quickly and has a lot to offer.
PyCharm really has it all as an IDE: code highlighting, auto-indentation that really works, customizable code-formatting, the best Python auto-completion I’ve ever seen (though it took considerable time to construct indices on first creating a project), on-the-fly error detection (plus spell-checking, which I find dubiously valuable), snippets, code-folding, smart quotes, brackets, colons, and even arguments: it’s really remarkably capable. It has powerful project navigation tools, automatic error-correction suggestions, excellent refactoring tools, documentation browser, Python debugger, unit-testing tools, and more. It’s excellent.
It also throws in special functionality for working with and debugging Django and Google App Engine apps, powerful editors for JavaScript, CoffeeScript, HTML, and CSS, various templating tools, a JavaScript debugger — are you convinced yet? The only think I would want from an IDE that it doesn’t have is a GUI designer; perhaps the JetBrains people didn’t want their excellent IDE to become known as the “RAD IDE for PyGTK”, or whatever toolkit they would have chosen. At any rate, there are plenty of standalone GUI designers available for the various GUI toolkits, and I don’t use them anyway, so it’s not a lack I feel too keenly.
PyCharm comes in two versions – a community edition, and a professional edition. The community edition is free (as in freedom), whereas the professional edition is partially-proprietary and ranges in price. They offer the professional edition to open source projects and educational institutions for free, whereas the price ranges from $29 – $199. You can checkout the full pricing here.
If I were a developer who was almost solely tied to Python, and I hadn’t already invested so much time in learning how to do everything PyCharm does with Emacs, I would strongly consider switching to PyCharm. You should definitely put it on your short list.
Wing IDE
Wing IDE Professional Edition (the edition I evaluated) is about the same cost as Komodo IDE, but that’s where the similarities end. It’s fast, full-featured, and it works. Auto-completion and auto-indentation are as good as the best reviewed here, integrated testing and debugging work well and have intuitive interfaces, and though the refactoring options are very limited, they work well once you figure out what selection should be in place before running the tool.
Snippets are present but not as cleanly implemented as in PyCharm or, even more so, Sublime Text; still, they’re reasonably sensible defaults, and you can edit them and add more.
A few miscellaneous points: Wing can do Django projects, integrates diff and merge, a good Python shell, an OS command interface that I found confusing and inferior to a mere console, and generally does about all you’d expect from an IDE.
I found the UI better than Eclipse/PyDev and slightly less well-planned than PyCharm, and it is less laggy than either. Wing is a very good option but pricey; if I were shelling out the cash, I’d note two things: the Personal edition omits only a few features I’d consider useful, and costs much less; and PyCharm, which is just as good on the average but slower, is about the same price as Personal.
Comparison of Python IDEs Summary
There are some very good options among IDEs: if you want a free one that works well, install Eclipse and PyDev; if you are willing to pay money, PyCharm and Wing IDE have similar capabilities and are both excellent IDEs. There are also some disasters to be had, both free and otherwise, but clearly IDEs for Python have advanced in the last decade, and can stand comparison to tools for less dynamic languages.