Using Wing with Pylons

Index of All Documentation » How-Tos » How-Tos for Web Development »

Wing is a Python IDE that can be used to develop, test, and debug Python code written for Pylons. Two versions of Wing are appropriate for use with this document: Wing Pro is the full-featured Python IDE for professional programmers, and Wing Personal is a free alternative with reduced feature set.

If you do not already have Wing installed, download it now.

This document describes how to configure Wing for Pylons. To get started using Wing as your Python IDE, please refer to the tutorial in Wing's Help menu or read the Quickstart Guide.

Installing Pylons

The Pylons website provide complete instructions for installing Pylons.

Debugging in Wing

Pylons can be set to run in an environment that spawns and automatically relaunches a sub-process for servicing web requests. This is used to automatically restart the server if for some reason it crashes. However, this does not work with Wing's debugger since the debugger has no way to cause the sub-process to be debugged when it is started by the main process.

To avoid this, do not specify the --reload flag. Place the following in a file that you add to your project and set as the main debug file:

from paste.script.serve import ServeCommand

This may vary somewhat, as necessary for your application.

Debugging Mako Templates

Wing cannot debug Mako templates directly, but it is possible to debug them through the .py translation (stored in data/templates in the Pylon tree).

Related Documents

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