Home » Support » Index of All Documentation » How-Tos » How-Tos for Other Libraries »
5.0. Using Wing IDE with Twisted
Wing IDE is an integrated development environment for the Python programming language. Wing can be used to speed up the process of writing and debugging code that is written for Twisted.
Note: This document contains information obtained from users of Wing IDE. Its accuracy has not yet been verified by Wingware.
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 right clicking on it and selecting Set As Main Debug File from the context menu:
from twisted.scripts.twistd import run
import os
try:
os.unlink('twistd.pid')
except OSError:
pass
run()
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:
- Wing IDE Reference Manual, which describes Wing IDE in detail.
- Twisted home page, which provides links to documentation.
- Wing IDE Quickstart Guide which contains additional basic information about getting started with Wing IDE.
| « 5. How-Tos for Other Libraries | Table of Contents | 5.1. Using Wing IDE with Cygwin » |
