You are here: Download Web>ConfiguringWing (17 Aug 2009)

Configuring Wing to work with Opus

This section provides instructions for configuring the Wing IDE for use with Opus.

Wing is a commercial IDE that supports Python well, especially for debugging.

Installing Wing

The Wing download site offers packages for Windows, Linux, and OS X.
  • On Linux, we found that an installation of the Linux RMP package for Wing version 2.0.3 done by rpm -i wing-rpm-file worked immediately for version 2.0.4 on a SuSe? 10.0 system.
  • The Mac version of Wing relies on X11, so on the Mac you’ll need to install X11 before running Wing. X11 comes with the Mac OS CD, but is not installed by default - you’ll need to install X11 separately from “Optional Installs.mpkg”. After you do this, download Wing. The tar file for the Mac expands into a folder containing the application; just copy it to your ‘applications’ folder. Start X11 before you start Wing; otherwise Wing will complain.

Configuring Wing

The following are suggestions for configuring Wing to work with Opus:
  1. Configure Wing to use spaces rather than tabs in Python code and to 4 spaces for indentation:
    1. Open Edit > Preferences
    2. Select Editor > Indentation
    3. Set Default Tab Size to 4
    4. Set Default Indent Size to 4
    5. Set Default Indent Style to Spaces Only
  2. Wing does not automatically detect files that you have added or removed from outside of Wing. However, there is a way to tell Wing to do this update, via a "Synch files" script that combines Wing's functionality of "Remove deleted files" and "Scan for new files":
    1. Download http://wingware.com/pub/wingide/contrib/synchfiles.py and put in Wing's scripts directory, e.g. in C:\Program Files\Wing IDE 2.1\scripts
    2. Start Wing
    3. Open your project
    4. Open Project > Properties > Options
    5. Set Project Type to Shared (Two Files)
    6. Save your project to the root directory for your project, e.g. to C:\opusworkspace
    7. Now when you want to update the list of files in your Project pane, right-click in the Project pane and select Synch files

Debugging Externally Launched Code

Wing allows you to debug programs that are launched outside of Wing. This can be useful for Opus, since Opus sometimes uses separate processes for running some tasks, e.g. for running each year of a simulation. Information on this is at the bottom of the Testing and Debugging Page on the trac wiki.

-- AlanBorning - 17 Aug 2009

Topic revision: r1 - 17 Aug 2009 - 00:03:49 - AlanBorning
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback