rick_grehan
Contributing Editor

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.

Python laptop coding
Credit: Billion Photos / Shutterstock

Python has certainly distinguished itself as a go-anywhere, do-anything language. As a language for desktop application development, it can be found behind the Resolver One spreadsheet. As an embedded script language, it’s inside the highly respected Blender graphics package and the Rhythmbox media player. It is the binding glue of the Sage open source math package and the Portage package management system of Gentoo Linux. On the Web, it powers the highly popular Zope, TurboGears, and Django frameworks. The list goes on, as any quick Google search will show.

Object-oriented and dynamic, Python encourages rapid, iterative, and almost exploratory development. But good Python development starts with a good Python IDE. In this roundup, I examine nine Python development environments, many open source, but some commercial. They are Boa Constructor, Eric, ActiveState’s Komodo, Oracle’s NetBeans, Aptana’s Pydev, PyScripter, SPE, Spyder, and WingWare’s Wing IDE.

Of course, there’s also IDLE, the IDE supplied with Python itself. Written using the Tkinter GUI toolkit, IDLE opens instantly into an interactive console. It has no notion of a project, nor is there an included GUI builder. Its configuration is minimal, dealing mainly with fonts, colors, and shortcut keys.

Its debugger is bare bones too, but it gets the job done. Activate the debugger, and when you run an application it starts up immediately. Buttons let you single-step, step over, or step out; also, you can set breakpoints by right-clicking the line in the text editor. While debugging, IDLE provides a view of the current stack and locals. You can activate views for source and globals; from the source view, IDLE will highlight the line that is the current execution point. IDLE is a no-nonsense IDE for editing and debugging Python modules and files as single entities. Many Python developers need more.

This flock of alternatives makes clear that there is no single best Python IDE; the range of problems that these IDEs attempt to solve is too wide to permit a solitary, superior candidate. If you need an IDE that allows development in multiple languages, then Komodo is probably your best bet, though Pydev is a close second and will likely be as good once its documentation holes are filled. If you need an IDE for GUI development, then Eric and Boa Constructor are equally good.

Be prepared, however, to work out development details on your own; both Eric and Boa Constructor beg for additional documentation. For building single-module Python scripts, PyScripter is excellent, though limited to Windows. Linux and Mac users should check out SPE. And finally, if you need an analytics environment for working with the NumPy and SciPy math libraries, Spyder is the place to go.

Happily, many of these products are free open source, and those that are not offer multiweek trial periods. Your best bet is to choose one that appears the closest fit to your particular requirements, and then turn yourself loose on it.

Nine fine Python development tools: Boa Constructor

Nine fine Python development tools: Eric

Nine fine Python development tools: Komodo

Nine fine Python development tools: NetBeans

Nine fine Python development tools: Pydev

Nine fine Python development tools: PyScripter

Nine fine Python development tools: SPE

Nine fine Python development tools: Spyder

Nine fine Python development tools: Wing IDE

InfoWorld Scorecard
Tools (20.0%)
Documentation (20.0%)
Platform support (20.0%)
Ease of use (25.0%)
Installation (15.0%)
Overall Score (100%)
Boa Constructor 0.2.3 9.0 8.0 7.0 6.0 9.0 7.7
Eric 4.4.6 8.0 4.0 9.0 7.0 8.0 7.2
Komodo 5.2.4 8.0 9.0 8.0 9.0 9.0 8.6
NetBeans 6.8 Python Early Access Version 9.0 8.0 6.0 8.0 8.0 7.8
Pydev 1.5.9 10.0 7.0 9.0 7.0 8.0 8.2
PyScripter 1.9.9.7 7.0 7.0 8.0 10.0 9.0 8.3
SPE 0.8.4 8.0 8.0 8.0 8.0 8.0 8.0
Spyder 1.0.3 8.0 8.0 7.0 8.0 7.0 7.7
Wing IDE 3.2.9-1 8.0 9.0 9.0 8.0 8.0 8.4

Nine fine Python development tools: Boa Constructor Boa Constructor is a free IDE written in Python that its creators describe as a wxPython GUI builder. By no means new, the first release of Boa Constructor debuted in the year 2000. The version I tested, 0.2.3, supports 2.x versions of Python from 2.1 to 2.6; I tested it with my 2.6 installation. The IDE’s author says it should also support version 2.7. It does not work with any 3.x Python releases, partly because wxPython (on which it depends) does not yet have a 3.x-compatible version, and partly because Boa Constructor’s author is not yet prepared to support two code bases. Boa Constructor supports neither Jython nor IronPython.

Boa Constructor’s user interface consists of a set of frames — separate windows that you employ in concert to create and debug Python applications. Those windows are:

  • Palette, a toolbar and multitabbed pane. Each pane opens into yet another toolbar. Click the New tab and Boa Constructor presents tool selections for creating a new Python package, module, and so on. Other tabs reveal toolbars for accessing visual controls — menus, buttons, and more — that are placed in the GUI designer.
  • Inspector, a window for viewing and modifying properties of currently selected objects.
  • Editor, Boa Constructor’s primary workspace. The editor provides different views, depending on what’s open in it. Open a Python module, for example, and it is displayed in the source view. Begin GUI development on a form, and the designer view opens. The editor also has an explorer view, which displays a tree control of the code’s components, including classes, methods, functions.
  • Explorer, in which you can navigate a variety of data sources: the file system, ZIP archives, CVS repositories, FTP, Zope objects, and more.
  • Debugger, which offers a self-explanatory view of all the fundamental debugging capabilities. It can debug multithreaded applications, and it has special support for debugging Zope scripts. You can also debug a remote application by importing debug server code into the target and adding a call that turns on the tracer. (You must also ensure that paths to source files are identical on both host and target.) Also, when you turn on the debugger, Boa Constructor opens an interactive console in the context of the debug target.

Boa Constructor does not have the concept of a “project,” as in having a project file that carries meta information about the other files that comprise the final application. Instead, when you create a wxPython application in Boa Constructor, the IDE builds a base Application.py file. If you open that file in the editor, an Application View tab appears that displays the other files within the application. However, if you open any other Python source file, no Application view tab appears because Boa Constructor recognizes that you’re working with a stand-alone module.

The layout of Boa Costructor’s IDE is unusual and takes some getting used to. In addition, the process of creating a wxPython application — knowing which button you must push or dialog you must conjure and from what pane in the IDE and when — is not obvious. Luckily, there are tutorials that guide you through the basics. Without those, I would’ve been lost my first time through the process. Even so, more tutorials would certainly be beneficial. Otherwise, the documentation is moderately good, and it includes both a reference guide and a Getting Started section.

Boa Constructor requires time to master, much less understand. Many of its quirks must be learned the hard way. For example, if you change a GUI component of an application in the designer, you click the Post button to have corresponding Python code written into the proper modules of your application. However, this does not actually save the changes. If you want to test the new application, you must click another button to save the source files to disk.

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.

Nine fine Python development tools: Komodo IDE ActiveState’s Komodo — from the purveyors of ActivePython and other Active languages — is available in two editions, the Komodo IDE ($295 for one user license) and the free Komodo Edit version. The free edition is more or less an editor with some additional tools. It does not have a debugger, code browser, or interactive shells. It is missing other capabilities; the details can be found in the comparative features table on the ActiveState website.

Komodo is a multilanguage IDE, supporting Ruby, Perl, PHP, and Python. I tested version 5.2.4 and did a bit of work with the beta of version 6, which became available while this article was underway.

When you first launch Komodo, you’ll notice that the initial start time is quite long. This is because it is reading modules and constructing its Code Intelligence database. Subsequent launches are as quick as the other IDEs tested.

Komodo’s source editor provides both auto-completion and call tips. You can extend auto completion to any module by setting the pythonExtraDirs preference; Komodo will scan the specified directories for Python modules and read them to fill its code intelligence database. When you type in a function, Komodo’s call tips will show both function prototype and docstrings.

Beside the editor window you’ll find source and object browsers. The source browser shows (and allows navigation in) the files that comprise the project, while the object view lets you browse and view the project’s classes, methods, functions, and more. The source editor also lets you quickly turn a piece of code into a snippet (template). Simply select a block of text in the editor and drag it into the Project pane; the new snippet will appear as a separate entity in the project tree, ready for reuse.

Komodo’s toolbox — found in the right-hand sidebar — is a handy storage container for Komodo components. Into the toolbox you can drop links to files or folders, templates, code snippets, URLs, macros, and more. In a team development scenario, you can establish shared toolboxes and share toolbox content among team members.

Not only does Komodo’s editor support multiple languages, it includes debuggers for Perl, Python, PHP, Ruby, Tcl, and XSLT. Komodo’s debugging core is based on the open source debugger protocol DBGP, which ActiveState developed in an earlier version with the assistance of the author of the DBGP client for PHP (that client became xdebug). Komodo provides the usual breakpoint capability, but adds to that a function call breakpoint. A function call breakpoint is not set on a particular line of code, but is triggered whenever a function is entered or exited.

Komodo supports remote debugging, but you have to install a remote debugger client package on the remote machine. (Komodo provides versions for Windows, Linux, and Mac.) You also have to place a debug script in Python’s path on the remote machine. Finally, the IDE can also perform postmortem debugging on a remote session via the breakOnExcept() function. Call this function, and when an exception occurs and reaches the top level of the Python application, a debug session will be triggered.

Komodo 5 has limited Python 3.x support; Komodo 6 will have full support for Python 3.x. Komodo 6 will also have a new database explorer, which will let you examine tables, view schemas, and issue SQL statements.

Unlike many of the open source IDEs, Komodo has no prerequisite libraries or frameworks to install. It is an all-in-one solution. Komodo has good documentation and is a good IDE, particularly if your development requirements take you outside of Python and into other dynamic languages.

Komodo is a solid IDE that not only supports multiple languages in its editor, but boasts a multilanguage debugger as well.

Nine fine Python development tools: NetBeans Oracle’s NetBeans, like Eclipse, is an open source, plug-in-based IDE originally built for Java development, but extended to other languages. I tested version 6.8, with what was described as an “early access” version of the Python plug-in. (Because plug-ins are community-driven projects, Oracle could not provide a likely release date.) I tested NetBeans with Jython 2.5.1, though the plug-in claimed that it would also work with the Python 2.6 and 3.1 installations I had.

If you’ve already used NetBeans for development in one of the other languages it supports — Java, Ruby, Groovy, PHP, JavaScript, C/C++, and Fortran — then you’ll have no problems finding your way around a Python project. NetBeans’ multipaned layout places Project, File, and Service view tabs on the left. The first two are what you’d expect. The third includes databases and Web services, depending on what plug-in you load, of course; I had installed Java plug-ins so that the services tab also included a Hudson Builders entry, Hudson being a Java-based build automation system. The database services tab was pre-installed with JDB-ODBC bridge, MySQL, and PostgreSQL. Beneath this is an object navigator pane, which gives a tree view for the current source file, showing each class, its methods, and instance variables.

NetBeans’ editor supports code completion. Enter an object followed by . (a period) and the available methods and object attributes appear in a pop-up list. Select a method and — if documentation is available for the method — that is displayed in another popup window. To accelerate development, NetBeans has templates for both Python files and code snippets. At the time of this writing, there were only three file templates, but numerous code snippet templates. Not all of the niceties of NetBeans are active for the Python plug-in, however. For example, the only two refactoring commands available were “find usages” and “rename.”

NetBeans has all the debugging features you’ll need: breakpoint, watches, stack trace, and so on. It can handle multithreaded Python applications, and you can configure the debugger so that the file stops on the first line of execution. When you launch the debugger, it also opens an interactive console, from which you can enter Python commands in the context of the application being debugged. What is missing is remote debugging, which is not yet supported.

Beyond Python-related features, NetBeans also provides a diff tool, with rudimentary merge capability (that you should experiment with before attempting in the field). The base IDE has support for the version control systems CVS, Subversion, and Mercurial. NetBeans also provides a “local history” feature. This keeps track of modifications you’ve made to files, so you can step back in time to previous editions. You can even restore deleted files. By default, versions for the last seven days are tracked, though you can modify this duration in the preferences.

NetBeans’ documentation for its Python components is limited. Most of the information, including a primer for using the Python debugger, can be found on the NetBeans wiki, but even that has several to-dos in it. Like Eclipse, NetBeans is good if you work in multiple languages and you need a squad of supporting tools on hand. However, the Python plug-in is still under development, and it needs work.

Nine fine Python development tools: Pydev Aptana’s Pydev is an Eclipse plug-in that supports development in Python, CPython, Jython, or IronPython. I tested version 1.5.9, running in a Galileo release of the Eclipse IDE. The version I explored will work with both the new Python 3.x as well as the earlier Python 2.x.

Installation is easy with the help of the Eclipse update mechanism. Just connect to the proper repository, select the Pydev install, and Eclipse does the rest for you. If you’re already familiar with Eclipse, you’ll have no trouble getting Pydev installed or finding your way around the capabilities Pydev includes.

Eclipse refers to a particular configuration of windows as a perspective. Two perspectives are important to Python developers: the Pydev perspective and the Debug perspective. You do your editing in the former; the latter is for running and debugging the application. When you install Pydev, you install three new project types: Pydev, Google Apps, and Django.

A Pydev project is merely a standard Python project; Google Apps and Django projects are created with special features and attributes appropriate for those two development frameworks. For example, if you create a Django application, Pydev automates a number of actions. You can launch a Python shell in the Django environment, issue a custom command, synchronize the Django database, and — if you happen to be working with the Jython variant of Django — create a WAR file.

As is standard for Eclipse, Pydev provides plenty of source editing customization features. For example, you can configure code folding so that it operates on while statements but leaves try statements unfolded. You can configure hovering so that placing the cursor over a method name displays docstrings. You can define similar customizations for the debugger (such as hovering over an in-context variable in the debugger will display its value in a pop-up). Pydev also installs plenty of templates and associates them with hotkeys. For example, select a function line in your code, click Ctrl+1, and a docstrings template is poured into the editor.

Pydev provides the expected Eclipse debugging arrangement. All the basics are there: breakpoints, watches, expressions, and so on. You can watch whole Python expressions. Select the code directly in the code editor by highlighting the snippet you’re interested in, select “watch,” and Pydev puts your chosen code fragment into the watch list.

Pydev supports debugging of multithreaded apps; it will also do remote debugging, but you have to do a bit of preparation beforehand. You must install a special remote debugging program in the Python path and ensure that the source files are on both source and target machines. Then you must edit the pydevd_file_utils.py file to map local paths to corresponding paths on the remote machine. It’s tricky, but fortunately there’s a section in the documentation that walks you through the process.

If you like scripting your development tools, Python accommodates with its Jython support. Because Eclipse is written in Java, you can actually script Pydev’s operations — in fact, you can script Eclipse itself — with Jython code written with Pydev’s help. (The 1.6.0 version, released just as I was finishing the review, includes an interactive console that accesses Eclipse’s internals, making this process even easier.)

Documentation is not to be found within the product. What you will find is an apology, followed by the justification that the documentation was too difficult to maintain within Eclipse, and please go online for Pydev information. The documentation you’ll find online is arranged well, but it’s sparse. You’ll find topics for getting started, configuring, building a project, and executing/debugging, as well as some information about working with Jython. But this is definitely an area where Pydev could use some improvements.

While Pydev does not have a GUI builder, its engineers point out that one really isn’t needed. A Qt plug-in is available for Eclipse, which provides a GUI builder whose results are available to Python via PyQt. If you’re already used to Eclipse, you’ll figure out Pydev in a jiffy. Aptana has outfitted it with all the features you’ll find in other Eclipse programming tools: code completion, hovering, refactoring. Pydev’s other great strength is its ability to work easily with all the popular Python versions (the 2.x and 3.x branches) and variants (CPython, Jython, and IronPython).

Nine fine Python development tools: PyScripter PyScripter is the creation of Kiriakos Vlahos. It was originally designed to be a scripting solution for Delphi applications. In fact, PyScripter is built with Delphi (with additional components created by Python for Delphi), and it is noticeably more responsive than the IDEs written in Python. On the downside, PyScripter’s Delphi roots limit it to the Windows platform. I tested version 1.9.9.7, which claimed to have support for most of the 2.x Python variants, as well as Python 3.1. I tested PyScripter with Python 2.6.

PyScripter’s interface is uncluttered and easy to navigate. Its editor supports code completion, as well as call tips, and will perform syntax checking on the fly as you type. You can create both code snippet and file templates for quickly pouring boilerplate code into an application’s source. And templates can be programmed to do more than paste in static source, thanks to PyScripter’s custom parameters, which let you script the behavior of templates. Custom parameters can be used, for example, to fetch system values — date, current directory, Python version — and write them into the source code when the template is employed. You can also define custom parameters that prompt the user for input and paste the response into the code. You can extend the IDE in a fashion: Any application that can be invoked from the command line can be added to PyScripter’s Tools menu.

PyScripter’s File Explorer window has a handy, graphical display of the Pythonpath, which you can update with drag-and-drop ease. The Project Explorer lets you create multiple run and debug configurations; each can have its own runtime parameters, working directory, local/remote Python executable selection, and more.

The Project Explorer also lets you configure whether or not the Python runtime is re-initialized before subsequent runs. Without this, if you run an application, stop it to examine something or make changes, and restart it, classes and globals might be retained from the preceding run, which can result in difficult-to-diagnose problems. This feature can be particularly useful when debugging GUI-based applications.

PyScripter uses the standard Python debugger, which supports watches, call stack viewing, breakpoints, and a locals window. You can do remote debugging via one of four remote engines, all making use of RPyC (Remote Python Call), which is bundled with the latest version of PyScripter.

The IDE also supplies remote engines for debugging Tkinter and wxPython applications, although the current debugger only really allows debugging of single-thread applications. More specifically, breakpoints only work in an application’s main thread. However, the IDE’s author points out that debugging multithreaded Python applications is possible with the excellent Winpdb debugger. The only price you have to pay is stepping outside of the IDE to get your debugging done. Considering both PyScripter and Winpdb are free applications, it’s difficult to complain.

PyScripter is easy to install. Unlike other IDEs in this roundup, there are no prerequisite tools or libraries that must be installed first (other than Python itself). It has no GUI builder, though documentation says that a wxPython form designer is in the works.

Nine fine Python development tools: SPE SPE stands for Stani’s Python Editor, after the IDE’s author. SPE is another free IDE written in Python, and it requires at least Python 2.6 to run, which is the version of Python I used. I tested SPE version 0.8.4. SPE will not work with a 3.x release of Python because it uses the wxPython windowing toolkit, which as of this writing is not yet available for a 3.x Python.

SPE does not install itself in your system menu (on Windows); you start it from the command line. If you have trouble with it (I did not), you can start it in debug mode (by appending a --debug parameter to the command line) and send the debug output to Stani for help. The IDE is arranged in a classic three-paned format: explorer, navigating, and browsing tools on the left; a large editor pane on the right; and output, interactive shell, and miscellaneous utilities at the bottom. Each pane in the three sections is tabbed. For example, the editor pane has a tab for source editing, a tab that displays a UML diagram of the code being edited, and a tab that provides a browsable PyDoc-generated view of the code’s documentation.

The lower pane’s interactive shell also provides a locals tab, which shows currently active objects. The session tab records past scripts that you either executed by hand or dragged and dropped into the shell. (This allows rewinding into the past.) The lower pane also has a search utility that can target either source files in the IDE or files within a specified file path.

In the explorer pane, you’ll find a list of imports, classes, and method definitions in the current file, arranged in the order they appear in the source. A handier search tab in that same pane is the index tab, which lists all named items, organized alphabetically. From the nearby file browser tab, you can launch files of known extension. (If the file type can be handled by the SPE editor, the file will open in the editor; otherwise it will launch in its appropriate application.)

However, you cannot use the explorer for dragging and dropping files from one folder to another. Nor does right-clicking provide a menu for, say, deleting files. SPE does not have the concept of project (you work with files as individual entities), but it does have the concept of a workspace. A workspace lets you save open scripts, recent files, notes, and so on, into a single file. A workspace is really just a way of saving project preferences.

The SPE editor includes code completion, call tips, and compile checking. This latter feature can be turned off if SPE appears to be running slowly. Turn it on, and SPE underlines syntax errors in red as you type; otherwise, syntax checking will occur only when you save the file. SPE doesn’t have its own debugger, but uses the excellent (and free) platform-independent and multithread-capable Winpdb debugger. Winpdb runs its own GUI, so starting an application in the debugger in SPE launches a separate application.

SPE’s interactive shell is Pycrust, which is part of wxPython. Drag and drop a Python source file onto the shell, and it will execute it as though you’d typed it. It also keeps a session history (called the “session recorder”) that you copy out of and paste into the shell. The interactive shell is useful while you’re working in the editor, too. Suppose you’re working against a module that is not in the Pythonpath and has not been imported. You can import the module in the interactive shell, and that module’s names will be incorporated into the SPE editor’s code completion capabilities.

One of SPE’s unique features is its ability to integrate with Blender, the free, commercial-grade graphical rendering and animation system. (It would be impossible to adequately describe Blender in this small space; see the Blender website for more info.) You can actually run SPE inside Blender, which can be scripted with Python.

SPE has special tweaks for use in Blender. When you launch a Python program from within Blender, Blender’s main loop can become blocked, and the Blender UI can freeze. Therefore, SPE redraws the Blender UI to keep the interface responsive. There are some tricks and gotchas to running SPE inside Blender, and these are covered in the SPE documentation.

SPE is a fine Python IDE that has all the basics covered. If you want to add capabilities, the IDE can be extended with wxGlade; the documentation explains how. Stani has done an excellent job of forming the software equivalent of alliances with other tools, so that anything missing from within SPE (GUI building, debugging) is handled by other means.

While SPE is free, its documentation is not, though it can be had by making a donation to SPE’s development. Currently, the recommended donation is €5, which works out to a bit over $6 at the time of this writing. This is probably not the IDE I would choose for building Web-based Python applications, but for scripting desktop applications (and certainly for an accompaniment to Blender) SPE is a solid choice, and the $6 donation is well worth it.

Nine fine Python development tools: Spyder Spyder is another Python IDE written in Python. It has been verified to run on Windows, Mac, and Linux.

Spyder is really a kind of numerical package that just happens to use Python as its scripting language. In fact, Spyder’s creator, Pierre Raybaut, purposefully incorporated features in Spyder to make its behavior similar to MATLAB’s and designed the Spyder workspace to look like MATLAB. Spyder requires PyQt, and at least PyQt4. To use Spyder as it is really intended, you should also download and install pylint, NumPy, SciPy, and matplotlib.

The version I tested was 1.0.3. I used Python 2.6 in my testing, though Spyder’s creator informed me that Spyder should work with Python 3.1, and he had reports of users running Spyder in a 3.x-level Python. However, he indicated that, for scientific and mathematical users, there is little different between Python 2.x and Python 3.x. In addition, as of this writing, NumPy and SciPy had not been ported to Python 3. (The development version of NumPy supports Python 3, and a release version is expected in the fall.)

Spyder has three startup levels: All, Basics, and Light. The startup level controls which components are imported when the IDE loads. All imports everything: the math libraries, os, sys, re, time, and os.path. Basics imports the math libraries only, and Light turns off all the add-ons. If you start the Light version, Spyder will not have access to NumPy, SciPy, and matplotlib, though you can manually import those libraries via Spyder’s interactive console at a later time.

Spyder’s interactive console opens automatically in a pane on the right-hand side of the IDE. Not only can you enter Python code, but the console will accept shell commands if you precede an entry line with !. For example, to get a local directory, enter !dir. The console also provides a history log of past commands, available within a separate tab. Select the tab, and you can cut and paste entries from the past.

Spyder also provides an object inspector that executes in the context of the console. Any objects created in the console can be examined in the inspector. More interesting, though, is the workspace view, which appears at first glance to be a kind of global variable browser for the interactive console, showing all global variables defined in the console, as well as their data type, size, and value.

Right-click on a global variable’s value field in the workspace, and a pop-up menu appears. Some of its selections are obvious, such as duplicate and delete. Others are not so obvious. You can, for example, select Plot for either Python or NumPy numeric arrays, and a line graph is displayed for the data. Or you can select Show Image for a 2D numeric array, and Spyder will display a pseudo-color representation of the array — which is completely cool if you’re not expecting it.

You can launch object specific editors from within the console. Just enter oedit(<obj>) and a GUI editor will open, allowing you to edit the contents of <obj> where <obj> can be a list, a tuple, a str, or a numpy.array of one or two dimensions. It’s important to realize, though, that oedit() does not edit the object in place. To have your changes stick, you must instantiate a new object and place the output reference of the oedit() call into this new object.

Spyder’s editor supports multiple languages, with color coding for syntactic elements of C, C++, and Fortran. The reason for this capability derives from Spyder’s origin as a development platform for science and math. Extensions to Python are often written in C/C++ and Fortran; in fact, much of NumPy’s calculation core is written in C. The multilanguage support allows developers to at least create the source for extensions without leaving the Spyder environment.

The editor does provide rudimentary code completion. Enter an object, follow with a . (a period), and Spyder will pop up a list of allowed methods. Begin typing a method and another pop-up appears, listing the allowed arguments and data types as well as the method’s return type. You can also run the PyFlakes lint-like tool on your source; PyFlakes locates a number of common syntax errors in the source.

Unfortunately, there is not much in the documentation about debugging. Also, while there are more than a half-dozen different Run variants (Run in interactive console, Re-run last script, Run selection or current block, and more), there’s only one Debug selection. Choose Debug, and Spyder opens a dialog that lets you enter command-line arguments, and then simply executes the current source file in Python’s debugger, pdb. Obviously, application debugging is not high on Spyder’s to-do list.

Because Spyder uses PyQt, you can use Spyder as an extension library for PyQt4 widgets. Spyder’s creator explained that some developers have used Spyder as an extension library to embed a Python code editor or console in their PyQt applications. Spyder also provides menu selections that activate the Qt tools: Qt Designer, Qt Linguist, and Qt Demo.

But Spyder is at its best when being used as an interactive console for building and testing scientific and numeric scripts and applications built on NumPy, SciPy, and mathplotlib. I would not choose Spyder for large-scale desktop or Web application development work. But for numerical analytics, I would reach for Spyder first.

Nine fine Python development tools: Wing IDE Wingware’s Wing IDE is available in three editions: Professional, Personal, and Wing IDE 101. All versions will run on Windows, Mac, and Linux, and all support the 2.x versions of Python, as well as Python 3.0 and 3.1. (I tested with Python 2.6.) The Professional version is the most expensive and of course the most feature-rich. The Personal Edition, for noncommercial and educational uses, has slightly fewer features but is low-priced. The free edition, being free, does not include features like autocompletion, multithreaded debugging, or remote debugging. (A feature comparison chart is available at the Wingware website.) I tested the Professional edition, version 3.2.9-1 using the IDE’s 30-day trial period.

The Wing IDE layout is straightforward, with the editor window being its central fixture. Supporting panes — source browser, runtime output and debug panes, and so on — are arranged on the periphery. In the lower right is the eminently useful Source Assistant pane, the Wing IDE’s answer to call tips. Begin typing, say, a function call, and the prototype and docstrings information for the corresponding functions are displayed in the Source Assistant. Continue typing, and the likely matches are appropriately reduced. Also, when you click a function name anywhere in the editor (whether at a definition point or a reference point), the function’s information is displayed in the Source Assistant. If you select a method, and that method has overridden a parent class method, the Source Assistant displays a clickable link for the location of the overridden method.

Wingware’s debugger is highly configurable. For example, you can set the debugger to stop when an exception is raised, but before the except or finally clauses have run; or you can configure the debugger to let those clauses run and then halt execution. Also, you can configure the debugger’s watch system to display an object’s content only when that object is in context, or hold a reference to the object and show its contents regardless of the current context.

The debugger can handle multithreaded applications; when debugging the target application is halted by, say, a breakpoint, by default the debugger stops all threads and indicates which thread caused the suspension. However, this is configurable so that, if one thread hits a breakpoint, the others can continue to run.

The Wing debugger also supports remote debugging. You have to import a debugging module at the beginning of the target application; the import loads code that provides the target side of the host/target communication. This is a snap if you’re remotely debugging an application on the local system. To debug on a separate machine, you must first install a debugger “core” file. Also, you have to define File Location Maps in the IDE. These maps are the means by which the debugger can match paths to source files on the local machine with paths to corresponding files on the target. Luckily, this process is well documented.

Although Wingware does not include any built-in GUI development capabilities, the documentation has how-to information for several popular Python GUI toolkits, including wxPython, PyQt, and PyGTK. Similarly, the documentation includes plenty of information about working with Web development frameworks, such as TurboGears, Zope, Django, and others. In particular, the documentation warns that Django’s feature for launching a subprocess to manage Web requests can confuse the Wing debugger, but describes various remedies. Some hyperlinks in the documentation lead not to other help pages, but rather activate specific components in the IDE that the documentation is describing. This is particularly handy; instead of searching through menus for a particular feature, the help system guides you right to it.

Wingware does not support Jython or IronPython — at least, not in the debugger. The Wingware engineers explained that supporting those variants would require significant rewrites in the debugger, and they had not received enough requests to warrant that. Still, if your development language is “regular” Python, Wing is a fine IDE, and its documentation and support for frameworks is top notch.

Nine fine Python development tools at a glance

  Hosts Python support Pros Cons Cost
Boa Constructor 0.2.3 Windows, Mac OS X, Linux Python 2.1 through 2.6
  • Complete wxPython development tool 
  • Provides a variety of explorers — even Zope databases 
  • Debugger can debug remote applications
  • IDE poses significant learning curve
  • Documentation could use improvement
Free
Eric 4.4.6 Windows, Mac OS X, Linux Python 2.x (Eric4), Python 3.x (Eric5)
  • Good GUI-construction support
  • Excellent plug-in management system
  • Free
  • Documentation is severely limited
  • Install prerequisites can be daunting
Free
Komodo 5.2.4 Windows, Mac OS X, Linux Python 2.x; Python 3.x support added in Komodo 6.0 beta
  • IDE supports multiple language development
  • IDE is extensible
  • Debugger is well-developed, with both multithreaded and remote capabilities
  • Not free
  • Some auto-completion capabilities are still under development
  • No built-in GUI development
$295 for a single-user license; Komodo Edit is free, but it is really just an editor
NetBeans 6.8 Windows, Mac OS X, Linux Python 2.x, Jython
  • Support for multiple languages and tools
  • Good template and macro support
  • Free
  • Documentation is limited
  • Remote debugging is not supported
  • Python 3.x support is uncertain
Free
Pydev 1.5.9 Eclipse Python 2.x, 3.x, CPython, Jython, IronPython
  • Provides access to other Eclipse tools
  • If you’re already familiar with Eclipse, then you know how to use Pydev
  • Has project assists for Django and Google App Engine
  • Documentation needs significant work
  • If you’re new to Eclipse, you’ll have to learn the Eclipse way of doing things
  • Has no integrated GUI development
Free
PyScripter 1.9.9.7 Windows Python 2.x and 3.1
  • More responsive than the Python-based IDEs 
  • Requires no additional downloads
  • Good templating capabilities
  • Windows only
  • Debugger is single-threaded
  • Has no GUI development (though one is in the works)
Free
SPE 0.8.4 Windows, Mac OS X, Linux Python 2.6 and later 2.x
  • Free (though documentation is not)
  • Useful tools well-integrated with the IDE
  • Can be used as a scripting tool for Blender
  • Has no concept of “project” — good for single Python files
  • Doesn’t provide its own debugger
Free; documentation requires a €5 (about $6) donation
Spyder 1.0.3 Windows, Mac OS X, Linux Python 2.x
  • Includes menu selections for Qt tools
  • Extensive data exploration tools for numerical array objects
  • Free
  • Debugging support is minimal (uses pdb)
  • Actual documentation for Spyder is limited
  • IDE can become frozen if code run in interactive console blocks
Free
Wing IDE 3.2.9-1 Windows, Mac OS X, Linux Python 2.x, 3.x
  • Source Assistant is top-notch code assist feature
  • Documentation has plenty of how-to sections
  • Debugger is multithreaded and remotable
  • Free edition is not much more than an editor
  • Hard to justify cost in a world of free IDEs
  • No GUI-building capability
$179 for Professional edition; Personal ($35) and free versions available

This article, “InfoWorld review: Nine fine Python development tools,” was originally published at InfoWorld.com. Follow the latest news in software development and Python at InfoWorld.com.