Making a project that uses Python and Pygame in Eclipse is easy thanks to the PyDev extension!
- File->New->Project...
- A dialog will appear in which there will be a list of project types. Find the PyDev entry and expand the list (double-click it or click on the arrow/cross next to the name).
- Select "PyDev Project" and click the Next button.
- Enter a name for your project in the "Project name" text box. Make sure the name uses CamelCase! e.g. MyProject, not My Project nor myProject nor myproject, etc..
- Make sure the type is "python 2.4" and "Create default 'src' folder..." is checked then click the Next button.
- A folder with the name of your project will show up in your left-hand navigation pane. Expand it using the arrow/cross.
- Right-click on the 'src' folder and select New->PyDev Module
- In the dialog enter a name (I recommend the same name as your project, but no uppercases, e.g. if your project is Wackadot name the module wackadot) and click the Next button.
- The module (a file really) will be created in your program hierarchy on the left and will be automatically opened in the main code editing window.
To run a program, first make sure to save any applicable files. Next find the green circle with the white "right arrow" in it. Click on the down arrow next to this then go to Run As->Python Run. This should show any console output at the bottom and open your pygame window if your project is using one. If your console is not visible at the bottom (and there is no tab to click on for it) it can be found in the menus: Window->Show View->Console.