Hi Harshad,
  Two comments:
     1) Use Python 2.5, it is the version running on production.
     2) The undefined variables problem you're having is with PyDev /
Eclipse.  You should check your logs and see if you can figure out
why, maybe the shell is not starting.  If you keep having issue ask on
the PyDev list.


Robert







On Sun, Jan 9, 2011 at 12:05, Harshad Kale <[email protected]> wrote:
> Hello folks,
> I am a beginner of the python world. I was trying to create a Google
> App Engine application using PyDev in Eclipse (HELIOS)
> I have Python 2.7 installed and configured (i believe) correctly
> inside Eclipse.
>
> After successful creation of a project, I get two errors in
> asklogin.py (I had chosen this template) as follows -
>
> - Description   Resource        Path    Location        Type Undefined 
> variable: True
> asklogin.py     /<My app name>/src      line 20 PyDev Problem
>
> - Description   Resource        Path    Location        Type Undefined 
> variable: __name__
> asklogin.py     /<My app name>/src      line 27 PyDev Problem
>
> Here is the code -
>
> from google.appengine.api import users
> from google.appengine.ext import webapp
> from google.appengine.ext.webapp.util import run_wsgi_app
>
>
> class MainPage(webapp.RequestHandler):
>
>
>    def get(self):
>        user = users.get_current_user()
>
>        if user:
>            self.response.out.write(
>                'Hello %s <a href="%s">Sign out</a><br>Is
> administrator: %s' %
>                (user.nickname(), users.create_logout_url("/"),
> users.is_current_user_admin())
>            )
>        else:
>            self.redirect(users.create_login_url(self.request.uri))
>
>
> application = webapp.WSGIApplication([('/', MainPage)], debug = True)
>
>
> def main():
>    run_wsgi_app(application)
>
>
> if __name__ == "__main__":
>    main()
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to