Skip to main content

EasyEclipse for Python and TurboGears

· 2 min read

EasyEclipse for python

People who are used to Microsoft VisualStudio or Java IDE usually criticize that python has no good IDE to cooperate with,

I think pydev is one of good python IDE, which is based on eclipse platform. But since you try to install it, it's pretty annoying to set the eclipse and pydev run properly.

Now EasyEclipse project provide an easy install pack of Eclipse for python, it contains:

  • eclipse platform itself,

  • pydev(eclipse python support),

  • Subclipse(eclipse SVN GUI),

  • and several useful plugins installed by default.It really ease the installation and configuration of Eclipse for python.

Pydev with Turbogears

Besides that, Pydev developer recently wrote an article for Configuring Pydev to work with Turbogears

It sounds like a right time to try for pydev + TurboGears.

So I searched and installed the Eclipse for python and EasyEclipse Web tools editors for eclipse HTML/CSS editor and an Internal Web Browser.

The result? It's not much too say.... pretty good:D

Start Up

First create a pydev project, it will assign a workspace for the project. Open the console, change path to the workspace folder. Use tg-admin tool to create a TurboGears projects named "projectname" within the pydev project workspace folder.

Now the project folder will shown on eclipse Navigator panel. (you may need use right click menu-> refresh) click the start-_projectname.py tap F9, then the web server will run.

You can use the "Open Web Browser" icon which is near with the search icon to open the internal Web Browser. Type http://localhost:8080 to see the welcome page :)

Sounds good?

Configurations

Here are a little configuration tips you may intrested...

Assign the python interpretor

1. open window/preference, select pydev/interpreter-python, click top right "Add" button to select the python.exe path (windows default is C:\python24\pythonw.exe). The proper library and key words will automatically load for you to use.

Template Association

2. select General/Editors/File Association, click top right "new" button to add "*.kid" file style for kid template. Press the second "Add" button to assign the associate editors to HTML Editor(default) and Internal Web Browser.

I also found a WYSIWYG HTML editor EasyEclipse eZingBuilder, but I can't get the kid page present correctly now.

more tips are welcome