Enable local memcache api in interactive console
authorSverre Rabbelier <srabbelier@gmail.com>
Sat, 05 Sep 2009 15:56:19 +0200
changeset 2863 150b42dac7c4
parent 2862 27971a13089f
child 2865 fee8732830f7
Enable local memcache api in interactive console
scripts/interactive.py
--- a/scripts/interactive.py	Sat Sep 05 14:04:24 2009 +0200
+++ b/scripts/interactive.py	Sat Sep 05 15:56:19 2009 +0200
@@ -97,6 +97,8 @@
     context: locals that should be added to the shell
   """
 
+  from google.appengine.api import apiproxy_stub_map
+  from google.appengine.api.memcache import memcache_stub
   from google.appengine.ext import db
   from google.appengine.ext.remote_api import remote_api_stub
 
@@ -111,6 +113,8 @@
     host = '%s.appspot.com' % app_id
 
   remote_api_stub.ConfigureRemoteDatastore(app_id, '/remote_api', auth_func, host)
+  apiproxy_stub_map.apiproxy.RegisterStub('memcache',
+      memcache_stub.MemcacheServiceStub())
 
   context['deepFetch'] = deepFetch