01 April 2008

The Abysmal State of Python IDEs

In the past few weeks I've sampled numerous Python IDEs for Mac OS X. Without exception, every one of them has major problems.

Without exception, they have crude GUIs, with drawing problems.

Without exception, every one of them has had either lacked completely, or had broken, the kind of source-level debugging that has been commonplace since the mid-1980s, such as visually setting breakpoints.

Most of them have the look of personal hobby projects, where the developer put in a little effort, and then abandoned the project. Menu items do nothing, help commands say "no help available." Documentation? Don't make me laugh, it hurts too much.

Even the allegedly polished products work really erratically. On Windows, I have to restart the ActiveState environment every time I want to re-run my program after making a change and saving the program, because it doesn't seem to ever realize that the file has been updated. Except sometimes it starts detecting changes for a while. It won't save my window layout. Except once in a while it does. However, breakpoints do work for me, and I'm able to do some debugging. But ActiveState for Mac seems to install completely different tools than ActiveState for Windows: no IDE whatsoever. Huh?

I'm having to do most of my debugging with print statements. I'm horrified. There is some kind of primitive debugger, but it requires modifying my source code, and that just seems stupid. The program I'm trying to debug is not unusual nor particularly complex; it just works over some XML and transforms some files.

My download log for tonight reads like a litany of failure: drpython, SPE, ScrIDE, and ActivePython.

DrPython: no interactive debugging. SPE: allegedly some kind of debugger, but it doesn't seem to work. ScrIDE: weird issue handling basic import statements that work on the other IDEs and with the command-line python without any trouble; other users are reporting this on the message board. ActivePython: claims to have some kind of IDE, but the Mac OS X package doesn't have it.

Is there one that would be as useful as, oh, Lightspeed Pascal circa 1985, if I were willing to pay for it?

As the song goes, is this all there is?


FDominicus said...

I'm suprised that you are suprised. Why should anyone work seriously in IDE development if nobody is willing to pay if the tools does not come from Microsoft or integrate into Eclipse?

As soon as you dare to ask for a decent payment you're lost.

Welcome in the "free" world

x6j8x said...

As you mentioned ActiveState... Why didn't you try Komodo?

Jon said...

Hmmm, you might not like the answer, but perhaps you should settle in with the evil empire. Iron Python has a plugin for Visual Studio, and it looks like it supports everything you want ( I have tried it casually, some time ago ).


You need a 'real' version of VS to use plugins.
Of course, Iron Python isnt a perfect implementation of CPython, Im not sure how much of a real world impact that is.

Unknown said...

If you don't mind paying for a commercial IDE, try WingIDE.


I have been using it for the last few months and I think its great.

Admittedly, I haven't found the need to use its debugging facilities, but they are certainly there. They appear to have all the features that you would expect.
It also has unit testing shortcuts that I find very useful. (You ask it to unit test a module, it finds the tests, runs them, and displays the results in a nice GUI for you; very nice)

Israel Tsadok said...

Eclipse with PyDev and PyLint does the trick for me. Don't try it on a slow machine, though.

Dirkjan Ochtman said...

Komodo Edit? It's been the best I could find.

Siddharth Mitra said...

I work with python on windows i kinda had the same problem so i just stuck with IDLE.
But lately i've been tinkering with xemacs/Ipython and it seems great altho requires a lot of effort to get started.

Filox said...

Ummm, have you tried PyDev (Python plugin for Eclipse)?

Unknown said...

Try Eclipse and PyDev.

Vale Stan Meir said...

I don't know about Mac, but I am pretty impressed with Eclipse and PyDev on windows.

balajis said...

I suggest you try emacs + pydb.

You may also find eclipse's python mode useful if you want a standalone app.

Anonymous said...

PyDev for Eclipse is pretty good.

Unknown said...

Nope. There are other options..., Komodo from ActiveState, Eclipse with PyDev, Eric and probably some more.

Steve Cooper said...

I'm just getting into python as a side-project from C#, and the difference is noticable. I figured it was just my ignorance of the state of the art. I'm only writing small stuff at the moment, but it'd be nice to have tools for larger projects.

rui said...

Hi, u should give a try in:


dguaraglia said...

Hi Paul!

Have you tried PyScripter? It's Windows only, but the feature set and stability (and the "oh, this actually works as expected" feeling) made it my IDE of choice.

Breakpoints, project support, code browsing, etc. all work appropriately, and then you have the niceties, like a built-in regex tester, etc.

The development page is http://code.google.com/p/pyscripter/

Note: you should download the latest "official" version, which is around 1.5.1 and install that, then replace the files with the zip file from the development version.


rrwood said...

Have you looked at WingIDE? Not sure about OS X, but the Linux and Win32 versions are very stable and elegant....

Anonymous said...

I used to work with Pydev (an eclipse plugin) and I had no major issues with it.


Jonathan Ellis said...

No, this is not all there is.

There are only three Python IDEs worth trying, and you managed to avoid all of them. :)

The three are (in my preferred order) Wing IDE, Komodo IDE (or Edit, if you are on a budget), and PyDev (for Eclipse).

Best value is PyDev (free) + Extensions ($40) if you can stomach Eclipse.

On OS X I might give the edge to Komodo because Wing runs in the X environment (it's based on GTK), which results in the usual X-related issues.

John said...

Take a look at PyDev for Eclipse. While Eclipse can feel heavy at times, PyDev does seem to answer all my needs: syntax highlighting, formatting, debugging, code coverage, code completion, etc.. It is also portable across Windows, Macs, and Linux.

juice said...

Have you tried PyDev plugin for Eclipse? I haven't tried it myself but I have had some good experiences using Eclipse for Java, C++ and PHP. Here are some links.

Article on eclipse+python:

Best regards,

Tom Hall said...

I use Emacs, lots of good stuff to work with Python. As I am relatively amature, I do not notice if PDB is weak.

Has some stuff on editing Python in Emacs, dot completion is not great is my only problem with it.

If you are on a mac, you can use

I have been meaning to play with
for a bit now, looks cool.

Dan said...

Well yeah, you tried the weird ones. Try Wing IDE and Eclipse (with py-dev).

Nederhoed said...

I'm also curious of your experiences with WingIDE...

Paul R. Potts said...

Thanks to everyone for the suggestions! I will be looking into some of these.

I'm not opposed to paying for a good tool if necessary. Visual Studio does not seem to be an option on a PowerPC Macintosh. Eclipse might be problematic on my Windows box as I'm already working with a customized Eclipse as part of the QNX toolchain. The comments about speed don't make me too eager to put it on a Mac Mini G4 or iMac G5, even though both have 2 GiB+ of RAM. I will try out some of the other options first.

Paul R. Potts said...

I'm downloading a 21-day trial of Komodo... if it is really good, then it is worth the $295 price. If not -- well... I like the fact that it claims to also work with Ruby and others. We'll see how it goes. Wing IDE is much less expensive, so I'll try that too.

My "surprise" is not so much that the free tools are a little primitive, but at the lack of debugging support. For the most part they seem to have thrown all their efforts into the editors. Editors are nice but for debugging, it seems to me that breakpoints and some kind of ability to inspect variables is worth far more than customizable key bindings...

Gabe said...

I'm surprised no-one has mentioned Erin IDE. It's PyQt based so it uses native widgets on mac (no drawing or look and feel issues) and it's fairly mature. For windows, you can get a whole package including everything you need from the pyqt folks.

On mac you may have to build the dependencies manually: Sip->PyQt->Eric IDE

Unknown said...

Pype is faily nice, if a little sluggish on sub-gigahertz processors. It is written entirely in Python.


Unknown said...

Pype is looks nice (wx) and has all the features you want.


Being written in pure python makes it a little sluggish on a P3, but I think I'm the only person who cares about such things.

Max said...

Time to ditch the whole IDE thing?

Unknown said...

Since it was only mentioned once, another vote for PyScripter.

Because: Free; clean modern look and feel; everything works; help up to date; responsive developer; full IDE feature set without being overwhelming and cluttered; small footprint.

Windows only, though.

I tried them all, and re-try them occasionally, and come back to PyScripter.

First go to the Official PyScripter IDE home at MMM-Experts and get the installer.

Then get the latest .exe and help
at Google Code.

Discuss, get help here.

Paul R. Potts said...

Komodo looks very impressive, but right off the bat, it doesn't want to handle the DOS/Windows line endings in my source files, and seems to be throwing up all kinds of syntax errors. It is probably some simple setting, but it is trying my patience already before it can even _parse_ the Python source files that have worked perfectly well with every other IDE I've tried, and with the command-line Python. Cross-platform line endings just should not be an issue in 2008. Will the Windows version give me similar problems if I move the files to UNIX line endings? Grrr...

Paul R. Potts said...

Hmmm, the Windows version of the Komodo IDE works fine on the identical files. I'll mess with the Mac version more later and see if I can figure this out.

Paul R. Potts said...

I spoke to soon; after just a few minutes of use, Komodo on Windows crashed with "Microsoft visual C++ Runtime Library" crashes, "R6025 - pure virtual function call." Then the whole system took one of those long, painful pratfalls where you can't bring up the Task Manager, most of the GUI is dead, shutdown can't kill anything, and you finally get so fed up you do a hardware reset. Ugly!

Unknown said...

How about you just use emacs? Or, since you're on a mac, Textmate?

Pedahzur said...

I'll add another +1 for WingIDE. I've been using it for over a year now, and have to say it is excellent. It's code completion is great, and it's debugger is a joy to use. It even support multi-threaded debugging.

Give it a try, I think you'll like it. I tried SPE, Komodo, PyDev, and Eric, and WingIDE was certainly the best out of all of them. Oh, and it does work on Mac.

Paul R. Potts said...

Several times I have taken a run-up at learning emacs, specifically because it comes so highly recommended as an environment for Lisp programming. Each time, I found myself really, really disliking it and got nowhere fast. Maybe one day I will try again, but for now I'm not interested. TextMate is also on my list of programs to try.

Mitch Barnett said...

This web-based IDE might be an approach if you don't mind IronPython...


GeorgeKangas said...

Your complaint that "I have to restart... after making a change and saving..." is, if I understand correctly, an issue with the Python interpreter, not with the IDE.

For efficiency, Python ignores "import" on a module that's already imported. To override this, you have to "reload(foobar)" instead of "import foobar".

Paul R. Potts said...

For what it's worth, I got several good hours of good debugging work out of Komodo IDE. The variable display is very nice and the editor is reasonable. The only thing I miss is that at a breakpoint, it didn't seem like I could evaluate expressions, like I could with Pythonwin. But this may just be something I have not figured out how to do yet. I have not yet watched the screencast to see if I'm missing something obvious.

So I brought home the project directory that was working great on Windows, and tried to open up the project and run the same program on my Mac. No dice: again with the strange syntax errors. This code executes perfectly well on my Mac's command-line Python.

I still want to try WingIDE. Thanks to everyone who made suggestions.

EmmEff said...

Ever since leaving the Windows world, I gave up the great (yes, I said it!) IDE that is Visual Studio.

With that said, does nobody use Winpdb (www.winpdb.org)? I have used it briefly, but not enough to pass judgement on it. It certainly looks capable, and despite the name it does advertise itself as a "Platform Independent Python Debugger".

Unknown said...

I deal with Komodo at work in three environments, and I'm rather surprised at your difficulties.

Working with different line endings is rather trivial: We always use unix line endings, since they're cross-platform. In Komodo you change this in the New Files part of preferences.

To deal with files with existing line-ending differences you can just right click on the open file and go to properties. In properties you will find the ability to change line endings or explicitly preserve them on a file by file basis.

Paul R. Potts said...

Hi Brendan,

It seems like the line-ending issue has pretty much been resolved; it appears that Komodo was initially complaining so much because the line endings were mixed.

However, I still am baffled by the syntax errors I'm getting when trying to build on the MacOS X version only. The functions in question look like this:

def makeRequiredElementTextDict( node, tag_names ):
return dict( ( tag_name, getRequiredElementText( node, tag_name ) ) \
for tag_name in tag_names )

Note the line-continuation character. I think that has something to do with it. (The original is indented, of course; I don't think I can get the comments to show the literal formatting).

I'm irritated as well that PythonWin from ActiveState has an editor that auto-indents differently than the Komodo IDE...

Jonathan Ellis said...

It's worth noting that the parentheses there make the line-continuation backslash unnecessary. Perhaps that's why Komodo doesn't expect one there.

Paul R. Potts said...

OK, I had a pretty productive day with Komodo for Windows. I'm again bringing the project folder home to work on my Mac.

Komodo IDE for MacOS X just does _not_ like this function:

def makeRequiredElementTextDict( node, tag_names ):
return dict( ( tag_name, getRequiredElementText( node, tag_name ) )
for tag_name in tag_names )

Oddly, it complains about a syntax error at the "for," whether the return statement is broken before the "for" with a forward slash and line break, just a line break, or all together on one line. The same file is handled just fine by Python on the command line. It also seems to be handled just fine in all three forms by the Komodo IDE for Windows. Very odd. Line endings seem to have nothing to do with the problem, since changing them has no effect.

I will submit this as a bug to ActiveState and see what they say.

Paul R. Potts said...

The fine folks at ActiveState already have proposed a possible reason for, and solution to, this bug. I will confirm tonight.

Apparently when I installed an updated Python on MacOS X 10.4, using the installer from python.org, it did not replace the standard installation under /usr/bin, but added a new one under /usr/local/bin, and changed the environment variables to refer to it. By default Komodo is seeing only the old one, which is python 2.3.

When coming across a problem like this it is often worth asking not just how to fix it, but how it could have been prevented. Otherwise we just implement workarounds, rather than improve the usability of the programs in question.

- If the installer from python.org had given me an option to replace the default python, I would have said yes. This is a case where I might have been better off doing a command-line install, because I would have had to specify just where the new python was going. Instead, I let the installer do what it thought was the right thing.

- If Komodo was able to use the existing environment, or check for a condition like this upon first executing, and ask me to choose with python to use by default, I would have asked it to use the newer version.

Either of these would have prevented this issue from arising. I will suggest the latter to the Komodo folks; they can do with that suggestion what they will.

Paul R. Potts said...

Followup: yes, the problem with Komodo on MacOS X was that Komodo's environment specifies a PATH containing only /usr/bin, not /usr/local/bin. Putting /usr/local/bin first and re-launching the IDE works to find the newer python. It's also possible to specify the exact path to use for Python in particular independently of the other languages supported.