Sunday, May 2, 2010

Python IDE: the Pydev plugin for Eclipse

Choices for a good open source Python IDE are not many! Today I'll show you how to quickly have a basic setup working with Pydev for Eclipse. Since the last post about SFTP and FTP support in Eclipse. You already know it is my platform of choice.

Pydev is a product by Aptana which also provides the Aptana Studio software for working with web development (Ajax, Ruby, PHP, etc...).  The plugin as all the usual features you would expect from a normal IDE and also some goodies like Django integration. Instead of a lengthy discussion on the pros and cons of this setup. Let's just go ahead with installing and configuring it so you can judge for yourself.

Installing the Pydev plugin.

To install install the plugin you obviously need to first have Eclipse. I generally start with Eclipse Classic but that will pretty much depend on your preferences... From Eclipse follow theses steps to get the plugin:

  1. Go the Help menu and click Install New Software.
  2. On the work with text box insert http://pydev.org/updates and click Add.
  3. You  can insert a name for this update site and wait for Eclipse to check the available content.
  4. Select Pydev and hit Next two times.
  5. Accept the license agreement if that's ok with you and click Finish.
After restarting Eclipse the plugin should be installed and ready to be configured.

Configuring the Pydev plugin.

To get started on programming with Pydev you now need to tell it where to find the interpreter:
  1. Open the Preferences window. Go to Window then preferences.
  2. Next you expand Pydev and select Interpreter - Python.
  3. On the right pane you can select Auto Config if your system path is properly set. Otherwise you might have to select your interpreter and libraries manually.
This is all that is needed for a basic setup. You can start exploring you newly installed Python IDE. Any suggestions are welcome.

2 comments:

  1. Thanks for the starter. How about a follow-up post where you guide the user through some PyDev best practices? i.e. package structures, unit testing, maybe some Python web work...

    Rick

    ReplyDelete
  2. Hi Rick,

    Thank you for the feedback and interest. Indeed folow-up posts on Pydev is an idea. I'll see what I can come up with along the lines of best practices and getting things done with this tool.

    ReplyDelete