On Python editors

Hearing a disturbance, The master programmer went into the novice's cubicle.

"Curse these personal computers!" cried the novice in anger, "To make them do anything I must use three or even four editing programs. Sometimes I get so confused that I erase entire files. This is truly intolerable!"

The master programmer stared at the novice. "And what would you do to remedy this state of affairs?" he asked.

The novice thought for a moment. "I will design a new editing program," he said, "a program that will replace all these others."

Suddenly the master struck the novice on the side of his head. It was not a heavy blow, but the novice was nonetheless surprised. "What did you do that for?" exclaimed the novice.

"I have no wish to learn another editing program," said the master.

And suddenly the novice was enlightened.

The Zen of Programming

Not yet being enlightened, I've groped around quite a bit in search of the One True Python Editor. I'll list most of the main ones I've tried below, but to save you from the suspense, my current choice is Komodo. I'll explain why below. Note that I'm going to wantonly conflate "editors" with "IDEs" here. Also, although it shouldn't need saying, these comments reflect my own, personal, biased view of each application.

SciTE
The open-source Scintilla Text Editor is the basis for most of the syntax-highlighting text editors out there, so you know it's rock solid. While being a fairly bare-bones editor, SciTE still has several killer features, including support for multiple languages (all customizable), and Lua scripting. To me, possibly the greatest feature of this cool little editor is the ability to run scripts in a command window, using the F5 hotkey. However, after using it for a while I started yearning for more power…

Notepad++
Also open source, Notepad++ is more sophisticated than SciTE, with features like a macro-recording facility and auto text, but it lacks the simple "run this file" feature that makes SciTE so great for quick-n-dirty scripting.

Eclipse with PyDev
I used Eclipse with PyDev for some time. This combination has a lot going for it. Eclipse is a very strong platform, and PyDev offers a lot of functionality. What's more, Eclipse is cross-platform. But Eclipse also has its annoyances and quirks, like the hoops you have to go through to run a script. And let's face it — Eclipse is kind of clunky. It would take ~30 seconds just to load up, and I'd keep getting mini-freezes, like waiting around for 5 seconds for a context menu to show up.

So I was a mostly satisfied user of Eclipse, but still on the lookout for the next big thing. I tried several other editors, like vim, PyPe, UliPad, SPE, PyScripter, and Wing IDE, but none of them was quite compelling enough to convince me to make the switch. I must say, I grew quite fond of vim, and use it for a lot of text and HTML editing still, but I really missed the quick edit-save-test cycle of Eclipse. But then I found:

Komodo
This is truly a great programming IDE. It's built for the so-called "scripting" languages, and it shows in the features. Komodo is closed source and commercial, but has a free, slightly stripped down (but still very serviceable) version as well.

Now I can hook up hot keys to commands that run the current file, run unit tests with nose, run pylint, and more. Plus, it has a vi emulation mode! Yeah! That fact that it's scriptable in Python is an added bonus. There are also several extensions available, with more being made all the time.

Komodo still has some rough edges, like it'll freeze if you're moving the mouse during the split second between the termination of a script and the output of the status code in the status bar. This has been a known bug for several versions. Also, it'd be great to have vim emulation instead of just vi — like, I'd love to be able to Ctrl-V text from the clipboard into the editor, instead of using Shift-Insert…

Still, despite some shortcomings and rough edges, Komodo is the best editor I've yet found for Python. And since it's in active development, I can be confident that the bugs will be fixed and new features forthcoming.

The PythonEditors page of the Python wiki has a huge amount of information on the many, many editors for Python out there.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>