Using Wing with pygame

Classic+

Wing Pro Screenshot Wing Pro Screenshot

Wing is a Python IDE that can be used to develop, test, and debug Python code written for pygame, an open source framework for game development with Python.

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

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

Project Configuration

Pygame works with Wing without any special configuration. These instructions apply both to pygame and to pygame-ce, its community-maintained fork, which is also imported as pygame.

To create a new project, use New Project in Wing's Project menu, press All Options if it is shown, and set Working With to Pygame. You'll be able to select or create a source directory for your project and select or create a Python environment. When you create a new environment, Wing fills in pygame-ce as the package to install. See Creating a Project for details on creating projects in Wing.

After you press Create Project in the New Project dialog, find your main entry point, open it into Wing, and select Set Current as Main Entry Point in the Debug menu.

Debugging

Now you can launch your game from Wing with Start/Continue in the Debug menu. Wing will stop on any exceptions or breakpoints reached while running your game, and you can use the debugger to step through code, inspect the value of variables, and try out new code interactively.

/images/doc/en/howtos/pygame/fishtank.png/images/doc/en/howtos/pygame/fishtank.png

To learn more about Wing's features, please refer to the tutorial in Wing's Help menu or read the Quickstart Guide.

Related Documents

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