Home » Support » Index of All Documentation » How-Tos » How-Tos for Other Libraries »

Using Wing IDE with Twisted

Wing IDE is an integrated development environment that can be used to write, test, and debug Python code that is written for Twisted. Wing provides auto-completion, call tips, a powerful debugger, and many other features that help you write, navigate, and understand Python code.

For more information on Wing IDE see the product overview. If you do not already have Wing IDE installed, download a free trial now.

To get started using Wing, refer to the tutorial in the Help menu in Wing and/or the Wing IDE Quickstart Guide.

Installing Twisted

The Twisted website provides complete instructions for installing and using Twisted.

Debugging in Wing IDE

To debug Twisted code launched from within Wing IDE, create a file with the following contents and set it as your main debug file by adding it to your project and then using the Set Main Debug File item in the Debug menu:

from twisted.scripts.twistd import run
import os
except OSError:

Then go into the File Properties for this file (by right clicking on it) and set Run Arguments to something like:

-n -y name.tac

The -n option tells Twisted not to daemonize, which would cause the debugger to fail because sub-processes are not automatically debugged. The -y option serves to point Twisted at your .tac file (replace name.tac with the correct name of your file instead).

You can also launch Twisted code from outside of Wing using the module wingdbstub.py that comes with Wing. This is described in Debugging Externally Launched Code in the manual.

Related Documents

Wing IDE provides many other options and tools. For more information:

Using Wing IDE with Twisted