Once you have installed Eclipse, follow these directions to download Python and the Eclipse plug-in for Python, and then configure Eclipse to develop code on Python.
Launch Eclipse. A screen like this should appear, where you can choose which workspace to open.
The Launcher may not have this folder exactly but you can browse to it or type a similar name to create one (replacing the first xxx with your name and the second with the number of your course). Select "Use this as the default and do not ask again. If you do, Eclipse will automatically use this workspace next time you open Eclipse. If you want to change the workspace later you can always go to File > Switch Workspace... to be sent back to the launch window.
You should now see Eclipse's Welcome screen:
Click on the arrow on the right to go to the workbench.
This is where you'll do most of your work in Eclipse.
You will now be shown a Software Updates and Add-ons screen. Select the "Available Software" tab.
Select "Add Site".
Enter "http://pydev.sourceforge.net/updates" under Location and click OK.

Back in the "Available Software" tab, select the "Pydev" option (you may have to expand the "http://pydev.sourceforge.net/updates" root to see it). Do not select the "Optional Extensions" flag.
Go to "Window> Preferences". In the Preferences window, expand "Pydev" and select "Interpreter-Python".
Click "New...", and browse to your copy of Python (probably C:\Program Files\Python25\python.exe), and press Open. A "Selection Needed" Window will appear.
Go to "Window > Open Perspective > Other..." and choose "PyDev". If you look at the upper right corner you will see that the perspective has changed from "Java" to "Pydev".
Perspectives are designed to have the most useful tools within reach for whatever task you are doing (for example writing Java code or writing Python code). If you look in the "File> New" menu you will see that there are different options with the different perspective.
|
Pydev Perspective
|
Java Perspective
|
|
|
As you can see, perspectives greatly affect the look of the program.
In the next window that appears, enter the name of your project and select "python 2.5"; as the type. Make sure "create default 'src' folder and add it to the pythonpath?" is selected. Click Finish.
If you look at the upper left corner of the workspace (in the Package Explorer view), you should now see your newly created project with a "src" folder inside.
Select the project you just created and go to "File> New> Pydev Module". This will launch a new Pydev Module Wizard where you should enter the name of your file and make sure it is in the right location. Leave the Package blank and select Finish.
Look in the Package Explorer view and you will see an icon of your new file inside the src folder, which Eclipse created when you made the new project before.
The file should be opened in the open space in the center of the workspace-the Editor view. (If not, right click on the greeting.py icon and select Open.) You will see a tab with the name of your file.
Here's a program to greet the world. Simply type
print 'Hello, World!'
into the file.
Right click on the file and select Save (or press Ctrl+S) to save the file.
(A quicker alternative is to right-click on the greeting.py icon, and select "Run As > Python Run")
Look at the bottom of your screen at the Console view and you will see the message you told the computer to print.
Congratulations! You have written your first program with Python.


One left-over oddity from the days of the MS-DOS operating system, is that Windows uses a different convention to indicate the end of lines of input. Unix, Linux, and Mac OS X use a single byte (with value 13) to indicate the end of a line. Windows uses two bytes (10 and 13). Somehow the combination of Eclipse, PyDev, Windows, and Python causes problems for programs that required console input. Here are two options for avoiding that problem:
from win_in import *You can use the Console in Eclipse like the interactive shell in IDLE if you configure it correctly. This is only recommended for advanced Python users. If that’s you, then follow the directions here.