InfoWorld review: Nine fine Python development tools
A wide-ranging flock of Python IDEs offer great options for Windows scripting, GUI applications, Web frameworks, multilanguage development, and more.
Nine fine Python development tools: Eric
The Eric IDE comes in two editions: Eric4 supports Python 2.x, and Eric5 supports Python 3.x. I tested Eric 4.4.6 using Python 2.6. Before you can use Eric, you must first download and install a number of other tools and libraries. According to the Readme file, those tools must be installed in a specific order. (I botched things the first time I installed Eric, but wiping everything out and re-installing cleared the matter up.) Happily, Eric's installation script will check all dependencies when you're done.
Eric is built on the cross-platform development framework Qt. For example, Eric's editor is built on QScintilla, a port of Scintilla to Qt. The IDE has excellent plug-in management support; its Plugin Management Window will show you all currently available plug-ins. Select a plug-in, download it, and when you close the plug-in management window, you are guided through the process of unpacking and installing it. The whole process is a good combination of automation and guidance. The one downside is -- as with Eric in general -- the lack of thorough documentation for individual plug-ins.
Eric has an extensive configuration/preferences system. Its size makes it daunting, but it's worth exploring; if something doesn't appear to be working, there's a chance you haven't configured it correctly. For example, when I first tried Eric's integrated browser, images were not shown for any of the Web pages. It turns out that loading images in the Web browser is a preference setting.
Eric lets you organize your work into projects. In fact, Eric has a multiproject viewer similar to Eclipse. You can add several projects to the multiproject viewer, and each is available at a glance. Though nice, it's a bit clunky; you cannot simply drag a project into the viewer. You have to open a project, give it a name and description, and then you can put it in the viewer.
You can think of Eric as container for a number of development tools. These include the Qt Designer for building Qt GUI applications, the Qt Linguist tools for localizing applications built in the Designer, and a UI Previewer that gives you a static view of the user interface that you've built in the Designer. There's a Translations previewer, which is similar to the UI previewer except that it shows how Qt Forms will appear when different translations are used, plus a couple of diff tools, an SQL browser, an Icon editor, and more.
Eric also has a boatload of wizards, most of which help with the construction of various Qt dialogs. There's the QColorDialog wizard, the QFileDialog wizard, the QInputDialog wizard, the QMessageBox wizard, and more.
As you might guess, Eric excels at building Qt-based GUI applications. You launch the Qt Designer to begin construction of a Form, which is the fundamental container for user interface components, such as Dialog, Widget, Main Window, and so on. The Qt Designer is a drag-and-drop GUI builder that's as good as any I've seen. It builds a *.ui file, an XML file that captures the properties and content of Forms in your application.
Ultimately, when it's time to run the application, Eric executes the pyuic tool, which reads the *.ui file and generates Python code. (Alternatively, you can keep the *.ui files around and generate the Python classes dynamically.) The code generator is intelligent. Suppose you've already generated code from a *.ui file that had several events selected, and for which stub handlers have been created. If you want to add more events, you can do that, regenerate the Python source, and Eric will recognize -- and not overwrite -- the existing user-supplied code.
Eric's multithread-capable debugger executes in a right-hand pane, within what is called the Debug Viewer. This provides a tab that includes local and global variables viewers, current breakpoints, watches, and triggered exceptions. The exceptions window shows the location in the source where the exception fired.
Eric has piles of other features. It has a plug-in for Subversion and the Python binding for Subversion (pysvn) built in. You can also download a plug-in for CVS and (if you're running Eric5) for Mercurial. Eric also comes with code coverage and code metrics reporting. The code metrics include a table showing the number of classes and methods in the target file, the number of lines of code, the number of lines of comments, and so on.
Eric's help system is a combination help viewer and HTML browser. Based on QtWebKit, it is actually a mixture of Web browser and Qt Assistant, Qt's document presentation tool. Unfortunately, Eric has no real user documentation. If you're interested in Eric's internals, that's a different matter. The documentation for Eric's API is extensive and well organized. There are tutorials on the website, and from these tutorials you can deduce many of the processes it requires to create the graphical portions of a Qt application. But once you get past the basics, you're pretty much on your own. Prowling the Internet for issues reported by other Eric users is one solution, but not a very good one. Put simply, Eric is a good IDE. With suitable documentation, Eric would be a great IDE.