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.

1 2 3 4 5 6 7 8 9 10 11 Page 8
Page 8 of 11

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.

Stani's Python Editor is an excellent IDE written in Python. Its toolset has obviously been crafted by an experienced developer.
Stani's Python Editor is an excellent IDE written in Python. Its toolset has obviously been crafted by an experienced developer.
1 2 3 4 5 6 7 8 9 10 11 Page 8
Page 8 of 11