Eclipse is an integrated development environment (IDE) that provides an array of convenient and powerful code editing and debugging tools. For instance, Eclipse allows you to pause the execution of your code and investigate the values of all assigned variables. Such functionality will speed up your debugging process greatly. Eclipse (and IDEs like it) are important tools in modern software engineering. Warning: make sure you read and understand the notes regarding file handling with eclipse in step (4) and (8) below. Some students have accidentally submitted empty (template) files because of misreading these steps.
Download Python here.
Important! This course uses the more widespread Python 2.5 / 2.6. Do not use Python 3; it's not backwards compatible.
You can download Eclipse here. The page should automatically detect your operating system. You want to download the "Eclipse IDE for Java Developers" (~90Mb).
Decompressing and opening should yield an Eclipse welcome screen. Close the welcome screen (close tab in upper left) to view the editor. You're now ready to install PyDev.
Eclipse installs extensions for you from within the application. All you need to provide is the web address of the extension you want to add (in our case, PyDev).
Help >> Software Updates >> Find and Install...
Search for new features to install
Pydev >> Interpreter - Python"
New...and locate your installation of Python.
File >> New >> Project...
Pydev >> Pydev Project
Now you're ready to create a new python file and run it from within Eclipse. Right-click (control-click on Macs) on your project and create a new blank file. Make sure your file ends in .py, and Eclipse will recognize it as Python code.
Type in some Python code (for instance:
print 2+2), then right-click
on the Python file you've created and select
Run As >> Python run .
You should see the output of your Python code in the console at the bottom of
the Eclipse window.
Now that you've run the code once, you can press the green
at the top of the Eclipse window to run it again.
Window >> Open Perspective >> Other...and then select the Pydev perspective. The changes you'll find are subtle; for instance you can create a new Python module by right-clicking on your project (instead of a generic file).
Debug As >> Python Runor click the bug at the top of the screen. Eclipse should automatically change to a debugging perspective, which allows you to inspect variables in the upper right pane of the window.