Free tutorials for Java, Eclipse and Web programming



Follow me on twitter

4. Using Eclipse

You can also use Eclipse for developing GAE applications via the PyDev plugin.

4.1. Eclipse and Pydev

Please see Python Development with Eclipse to learn how to install and use Eclipse and Pydev. The remaining focuses on the additional setup to use the GAE.

4.2.  Project

Create a Python project called "de.vogella.gae.python.todo". See Python Development with Eclipse for how to create a new Pydev / Python project in Eclipse.

Use Python version 2.5. Remember that the GAE does currently only support Python version 2.5

Copy the content of the directory from the previous example (all your files and directeries): todo.py, app.yam, index.html)into the source folder.

4.3. Make GAE SDK available

We need to add the GAE SDK to the pythonpath. Right click your project and select properties. Select PYTHONPATH and press "Add source folder" in the "External Source Folder". Select the installation directory of the GAE SDK. Also add lib/django, lib/webob and lib/yaml

4.4. Run your application

You still can use the command line to run your GAE application. But we are now going to configure Eclipse to allow you to run your application directly from Eclipse.

Right click on "todo.py", select Run As -> Run Configuration. Under Main Module maintain the path to dev_appserver.py

Switch to the argument tab and maintain the full path name of your project as a parameter. Put the parameter in double-quotes.

Click run to start your application. If you have the console view open (Window -> Show View -> Console) you should see the familiar output of the GAE and be able to open the application in your browser as before.