BlackAdder
Before beginning with my review of BlackAdder, I have to tell you that I'm currently engaged in writing a book on it. The book, provisionally titled Python and Qt: Rapid Development with BlackAdder, will deal mostly with PyQt (which has been an area of special interest to me for years), but will also have a few chapters on working with BlackAdder. I merely mention this so you can budget in this interest with my remarks. Of course, I wouldn't write a book about BlackAdder if I thought it wasn't any good!
BlackAdder is a Python-only IDE that's squarely based on PyQt and Qt. The base is Qt Designer—the enormously capable GUI designer of Trolltech. It has been possible for a long time to generate running Python code from the XML GUI design files created by Qt Designer, and Phil Thompson recently decided to integrate Qt Designer with his Python debugger, Eric, and editor, and to make a fully fledged IDE out of it. BlackAdder is the work of one man, not a team—a fact that makes its rapid development all the more special.
BlackAdder is unashamedly commercial (see Figure 3). While PyQt is pukka OpenSource, as are Qt and Qt Designer, you'd need to buy a commercial Qtlicense at $1,500 to compile PyQt for Windows. BlackAdder solves that problem bymaking available in one package a binary for Linux and Windows that includes notonly the IDE, but also the runtimes for Windows and lots of documentation.
Figure 3 About BlackAdder.
You can buy the personal edition, which really doesn't cost a lot ($79.99), or the pricier business edition ($399.99). The difference is that you can't use the personal edition in a commercial setting, or distribute the runtime components of the personal edition. Of course, anyone with a relatively recent Linux distribution that includes PyQt can run the applications you write with BlackAdder personal: They don't need the runtime components. Those runtime components are really only necessary for Windows users. With the imminent release of Qt 3.0 for MacOS X, there may be a version of BlackAdder that runs on OS X, too, making PyQt the most cross-platform Python GUI there is.
BlackAdder is a strongly integrated package built around three core components: Qt Designer, the Scintilla editor, and Eric, the PyQt debugger. Underlying this ensemble is Python.
The interface has not been finalized yet. Currently, BlackAdder has an MDI window with a window for every open project; within those windows are panes for files, GUI designs, the project explorer, the widget properties, or the GUI object browser.
Qt Designer is one of the best GUI designers I've ever used. It offers a wide range of widgets that can be programmed using PyQt, the Python bindings to the Qt toolkit. You can easily create complex layouts that can be managed by Qt's powerful layout engine. The designer module produces interface definition files in XML format, and those files can be compiled from within BlackAdder to valid Python code. The very same interface-definition files can be compiled to C++ code. This makes BlackAdder ideal for rapid prototyping: First develop in Python and Qt, then regenerate your interface for C++ and decide whether you want to rewrite the application logic in C++ or in a mixture of C++ and embedded Python. You can test every design without writing a single line of code, in any of six GUI styles, including Motif, Windows, and MacOS platinum.
Figure 4 The BlackAdder GUI Designer.
I've often sung the praises of Scintilla, the premier Python editor, developed by Neil Hodgson. It offers syntax highlighting, intelligent indent, folding of classes and methods, and in general a pleasant and responsive editing action (see Figure 5). Phil Thompson and Shawn Gordon have indicated that they will make their port of the Scintilla engine to the Qt library freely available, and this would certainly be a Good Thing. Wing IDE and Pythonwin also make use of Scintilla, as does Komodo. Scintilla is so good that it deserves its near-monopoly in the small Python editor-component market!
Figure 5 The BlackAdder editor.
However, BlackAdder is still in beta, and not all Scintilla features are usable from BlackAdder. Auto-completion is missing, but smart indenting is supported. Rather unexpected is the fact that in this beta find-and-replace is not yet available. No doubt this and several more subtle interface problems will be resolved before the first full release. Beta customers get a hefty discount for their troubles, though.
The BlackAdder debugger has come a long way from the feeble Eric debugger that's still included in PyQt. It's really easy to use, with breakpoints and informational window with variable values. It's not as full-featured as Wing IDE's debugger, but that's almost a special case. The debugger knows when to stop: You won't lose track of what you're doing by debugging Python's String module. In other respects, it needs some work: The current line isn't always kept onscreen, for instance.
Project management is limited to Python files and Designer definition files, and quite basic. You can't set a file as the startup file for a whole project, or edit project descriptions. BlackAdder currently also lacks a class browserÑsomething that I miss sorely.
However, BlackAdder is the first Python IDE that's firmly integrated with a really good GUI designerÑone that offers the developer a rich, modern, cross-platform set of GUI components. The ease with which it's possible to move from a Python prototype to a C++ application must appeal to everyone who plans on developing a cross-platform application. I have no doubt that the usual accoutrements of a well-used IDE will come to BlackAdder as to othersÑfind-and-replace, a class browser, or a macro facility.