Looking at the code you have put in your post you certainly will get syntax errors.
I suggest you fix all the syntax errors first. Also if you want to see an example of a remote connection to the datastore have a look at the remote_api_shell Rgds T On May 13, 11:32 pm, Soby <[email protected]> wrote: > Hi all, > > I need help in connecting to Datastore remotely. Actually I have a > script, I was going through a book by O'Reilly on Programming Google > AppEngine. In that there was a script to connect remotely, > > #!/usr/bin/python > import getpass > import sys > > sys.path.append('~/google_appengine') > sys.path.append('~/google_appengine/lib/yaml/lib') > > from google.appengine.ext.remote_api import remote_api_stub > from google.appengine.ext import db > import models > > APP-ID = 'app-id' > REMOTE_API_PATH = '/remote_api' > def auth_func(): > email_address = raw_input('Email address: ') > password = getpass.getpass('Password: ') > return email_address, password > > def initialize_remote_api(app-id=APP-ID,path=REMOTE_API_PATH): > remote_api_stub.ConfigureRemoteApi(app-id,path,auth_func) > remote_api_stub.MaybeInvokeAuthentication() > > def main(args): > initialize_remote_api() > books = models.Book.all().fetch(10) > for book in books: > print book.title > return 0 > > if __name__ == '__main__': > sys.exit(main(sys.argv[1:])) > > It showing me errors like syntax errors and import error on > remote_api_stub > Can anyone help me on this ??? > > -- > 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 > athttp://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.
