Tip:
Highlight text to annotate it
X
Marks: Hi. I'm Mano Marks.
And I work with Google App Engine.
If you've gotten this far,
you're probably aware that App Engine enables you
to build scalable web applications
on the same systems that power Google applications.
This video walks you through setting up Eclipse,
an integrated development environment.
It's based on an excellent article by Joscha Feth
on code.google.com.
Download and install Python 2.5 or higher.
Download and install the latest version of Eclipse.
For this demo, we will be using Eclipse 3.4.0.
Download and install the latest version
of the App Engine development server.
All right. So to start configuring Eclipse.
Eclipse is a flexible development environment.
With the proper plug-ins,
it can be used with many different programming languages.
In order to set it up to work with Python,
you need to set up a Python plug-in.
We're going to use Pydev.
So in order to install Pydev,
open Eclipse and go to Help, Software Updates.
Click Add Site.
And then enter pydev.sourceforge.net/updates
in the location field.
And click OK.
Next, select the Pydev updates that you just added.
Choose to install Pydev for Eclipse.
After the update site has been searched,
click on Finish.
Choose Yes to restart Eclipse.
After Eclipse restarts,
choose Windows, Preferences
to bring up the Preferences dialogue.
Change the Pydev Interpreter Python section
to configure Python.
Click on New.
Search for the python.exe executable,
normally at C:\Python25.
After you select the executable,
Pydev will search for libraries
and the following screen appears.
Normally the preselection done by Pydev is fine.
So click on OK to accept the system Python path entries.
In the Preferences window,
click OK to configure your changes.
After you have Pydev installed on Eclipse,
you are ready to start developing your application.
Right click on the package explorer
and choose New, Other.
In the dialogue box,
select Pydev Project from the Pydev folder.
Create a new helloworld project with Python 2.5.
After clicking Finish,
Eclipse will switch to the Pydev view.
Right click on your new project and choose Properties.
In the properties dialogue,
choose the Pydev PYTHONPATH section
to add the App Engine libraries.
Click on Add source folder
to add the following folders
from your Google App Engine folder.
Click OK to confirm your changes.
The last thing we need to do is create an application
and add a run configuration.
We're going to use the helloworld code
from the Getting Started section of the documentation.
Here you see me creating the app.yaml
and helloworld.py files.
Go to Run, Run Configurations.
Choose Python Run and add a new launch configuration.
Name your run configuration.
Under Project,
add your Google App Engine Python project.
Under Main Module,
add the location of the dev_appserver.py script.
Change to the Arguments tab
and enter this code as your first argument.
After this argument,
you may add all available additional arguments
listed on the dev web server documentation page.
Here, for example, we change the port
where Google App Engine is listening to 9999.
Click on Apply to save your changes.
Click on Run to run your application.
From now on, you can run your project by selecting
your configuration from the Run dropdown
and access your app on http://localhost:9999/
For more information, visit code.google.com/appengine.