Using Wing with Paste and 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 Paste and Pylons (which is based on Paste). 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.

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

Installing Paste and/or Pylons

The Pylons website and Paste website provide complete instructions for installing Pylons or Paste

Debugging in Wing

Paste and 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 for Paste. 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: