views:

936

answers:

4

I was doing some beginner AppEngine dev on a Windows box and installed Eclipse for that. I liked the autocompletion I got with the objects and functions.

I moved my dev environment over to my Macbook, and installed Eclipse Ganymede. I installed the AppEngine SDK and Eclipse plug in. However, when I am typing out code now, the autocomplete isn't functioning. Did I miss a step?

UPDATE

Just to add to this:

the line:

import cgi

appears to give me what I need. When I type "cgi." I get all of the auto complete. However, the lines:

from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db

don't give me any auto complete. If I type "users." there is no auto complete.

A: 
Robert Munteanu
All the proposals are checked...should they be?Also, I am using Python, not Java. Should that matter?
Brandon Watson
Looks like you're missing a Python plugin - perhaps http://pydev.sourceforge.net/ .
Robert Munteanu
Nope, pydev is there. I have autcomplete for the python libs and my own modules. What I dont have is autocomplete for the GAE libs.
Brandon Watson
+1  A: 

The App Engine plugin for eclipse is for the Java SDK, not for the Python one. I don't know eclipse very well, but I suspect what you're missing is simply the path to the App Engine SDK included in eclipse's pythonpath configuration. Find somewhere to add that, and it'll be able to find the SDK classes and offer autocomplete suggestions for them.

Nick Johnson
I am zeroing in on this being the right answer, but what I don't know is where AppEngine put the SDK on my disk. I know where I put their AppEngineLauncher, but what I don't know is where to point Eclispe for the PYTHONPATH. Any help would be appreciated.
Brandon Watson
If you're using the AppEngineLauncher, your SDK is in /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/ - ugly, I know.
Nick Johnson
I solved it differently, but I will delete the references I made in my PYTHONPATH using the solution I found to see if this works as well. Thanks so much for this posting Nick.
Brandon Watson
A: 

To have Eclipse auto-complete your Python code you need to install Pydev into Eclipse.

It's a free plug-in and is available here: http://aptana.com/python

The URL to use when updating Eclipse: http://pydev.sourceforge.net/updates/ (In Eclipse, select 'Help/Software Updates...')

An enhanced version of the plug-in called Pydev Extensions (costs: http://www.fabioz.com/pydev/buy.html) that provides more functionality including code-analysis, code completion with auto-import and remote debugging.

Carl
A: 

I found the answer from a poster on the Google App Engine forum. I will blog the experience later, but this one gets a FAIL for GOOG. You need to click on the download link for "Linux/Other" to get the ZIP file with the right files. You can then point your PYTHONPATH at the directory on your local machine.

The fail here is that the Mac SDK download gives you the AppEngineLauncher, but not these files. Nowhere on the AppEngine site, or in the directions GOOG publishes, do they suggest that as a Mac developer that you should download these "other" files. Very, very, very annoying.

Brandon Watson
The files _are_ in the launcher - just inside the app, in the location I described.
Nick Johnson