scripts/interactive.py
changeset 2907 fbf0d63f37b9
parent 2879 cb0f9b4646aa
equal deleted inserted replaced
2906:6fb53ed7aff4 2907:fbf0d63f37b9
    96     args: arguments from the user
    96     args: arguments from the user
    97     context: locals that should be added to the shell
    97     context: locals that should be added to the shell
    98   """
    98   """
    99 
    99 
   100   from google.appengine.api import apiproxy_stub_map
   100   from google.appengine.api import apiproxy_stub_map
   101   from google.appengine.api.memcache import memcache_stub
       
   102   from google.appengine.ext import db
   101   from google.appengine.ext import db
   103   from google.appengine.ext.remote_api import remote_api_stub
   102   from google.appengine.ext.remote_api import remote_api_stub
   104 
   103 
   105   if not context:
   104   if not context:
   106     context = {}
   105     context = {}
   111     host = args[1]
   110     host = args[1]
   112   else:
   111   else:
   113     host = '%s.appspot.com' % app_id
   112     host = '%s.appspot.com' % app_id
   114 
   113 
   115   remote_api_stub.ConfigureRemoteDatastore(app_id, '/remote_api', auth_func, host)
   114   remote_api_stub.ConfigureRemoteDatastore(app_id, '/remote_api', auth_func, host)
   116   apiproxy_stub_map.apiproxy.RegisterStub('memcache',
       
   117       memcache_stub.MemcacheServiceStub())
       
   118 
   115 
   119   context['deepFetch'] = deepFetch
   116   context['deepFetch'] = deepFetch
   120 
   117 
   121   code.interact('App Engine interactive console for %s' % (app_id,), None, context)
   118   code.interact('App Engine interactive console for %s' % (app_id,), None, context)
   122 
   119