03 April 2008

Snakes on the Wing

So far, Wing IDE gets the nod as the best Python editor I've tried. I had a very productive day with Wing IDE on Windows, and it worked great, with no crashes, and very nice debugging functions.

WIng IDE for MacOS X is an XWindows app. This makes it very slightly un-Mac-like, but it makes up for it by having some nice GUI themes. I haven't yet exercised the Mac version very hard, but it seems quite nice so far.

I'm grateful for all the recommendations!

Beware the IDEs of April

My post on Python IDEs got a huge number of comments, including recommendations for Eclipse with plug-ins, Visual Studio with plug-ins, and Emacs.

One of the two highest-recommended options was Komodo IDE. I've had some success with a trial of Komodo IDE on Windows, with only one major crash, which I was unable to reproduce. However, the same code brought over to run under the same version of Komodo for MacOS X produces a strange syntax error. I've filed this as bug 76114. It seems quite strange, especially given that the same code runs fine using the command-line Python under MacOS X. Despite this issue it seems overall to be a pretty usable environment.

I've also had several recommendations for WingIDE, which I will check out as well. Thanks to everyone who responded!

The program mostly reads an XML file, does a little validating and destructuring of the nodes into dictionaries, and then generates some C++ using a template. About as "real-world" a program as they come. Even as boiled-down as I can make it, it still seems awfully wordy and full of functions whose behavior is extremely dependent on my intermediate data representation. In Common Lisp, I'd be trying to use s-expressions instead of XML for the starting data, and using destructuring macros to turn the input data into data structures. With NewtonScript, I might try to find a way to do it by writing accessors that used path expressions. Is there a better way in Python? How about Haskell? I'll have to give it some thought.

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?