Up until recently, I’ve been writing Python programs in IDLE, the IDE included with Python. Writing single-module programs in IDLE works well enough, but Eclipse is much better when writing a program with multiple modules, classes and/or packages. The PyDev plugin for Eclipse allows programmers to develop for Python, Jython and IronPython by providing an editor with code completion and syntax highlighting, and a debugger, among other features. IDLE contains many features as well, and can be extended, but I find Eclipse much nicer to use. If you’ve already used Eclipse for programming Java, C++ or another language, PyDev makes it easy to get up and writing Python applications in no time.
Installing PyDev is simple:
- Install Eclipse, Java 5+ and Python/Jython/IronPython
- note: PyDev is also pre-installed with Aptana Studio 3, if you don’t want to use Eclipse
- Within Eclipse, add the PyDev repository and install the plugin
- Navigate to Help -> Install New Software… Click “Add…” to add one of the following PyDev repositories:
- Main: http://pydev.org/updates
- Nightly builds: http://pydev.org/nightly
- Check the box to install PyDev and follow the prompts
- You’ll have to restart Eclipse when you’re finished
- Navigate to Help -> Install New Software… Click “Add…” to add one of the following PyDev repositories:
- Make sure PyDev can find your Python/Jython/Iron Python interpreter
- Navigate to Window -> Preferences -> PyDev -> Interpreter – [Python/Jython/Iron Python] to tell PyDev where your interpreter is, if it can not find it
Once you have the plugin installed, the PyDev website has a great tutorial to get you started. Happy coding!