Hi,
On Aug 11, 8:02 pm, NealWalters <[email protected]> wrote:
> This maybe what you are asking
> about?http://code.google.com/appengine/articles/remote_api.html
indeed, this looks really good. :-)
But the example doesn't work here.
I'm running the guestbook example on localhost:8080 and want to access
it with a client program.
I have changed my helloworld app.yaml to:
application: helloworld
version: 1
runtime: python
api_version: 1
handlers:
- url: /.*
script: helloworld.py
- url: /remote_api
script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py
login: admin
and the client code looks like:
#!/usr/bin/python
import code
import getpass
import sys
sys.path.append("~/googleapp/google_appengine")
sys.path.append("~/googleapp/google_appengine/lib/yaml/lib")
from google.appengine.ext.remote_api import remote_api_stub
from google.appengine.ext import db
def auth_func():
return raw_input('Username:'), getpass.getpass('Password:')
if len(sys.argv) < 2:
print "Usage: %s app_id [host]" % (sys.argv[0],)
app_id = sys.argv[1]
if len(sys.argv) > 2:
host = sys.argv[2]
else:
host = 'localhost:8080'
remote_api_stub.ConfigureRemoteDatastore(app_id, '/remote_api',
auth_func, host)
code.interact('App Engine interactive console for %s' % (app_id,),
None, locals())
But if i try to run the program i get this error message:
$ python client.py helloworld
Traceback (most recent call last):
File "client.py", line 9, in <module>
from google.appengine.ext.remote_api import remote_api_stub
ImportError: No module named google.appengine.ext.remote_api
Any idea what's wrong?
Thanks!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---