scripts/interactive.py
changeset 2871 e440e94a874b
parent 2863 150b42dac7c4
child 2879 cb0f9b4646aa
equal deleted inserted replaced
2869:1ac6a1e1e429 2871:e440e94a874b
    95   Args:
    95   Args:
    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
       
   101   from google.appengine.api.memcache import memcache_stub
       
   102   from google.appengine.ext import db
   100   from google.appengine.ext import db
   103   from google.appengine.ext.remote_api import remote_api_stub
   101   from google.appengine.ext.remote_api import remote_api_stub
   104 
   102 
   105   if not context:
   103   if not context:
   106     context = {}
   104     context = {}
   111     host = args[1]
   109     host = args[1]
   112   else:
   110   else:
   113     host = '%s.appspot.com' % app_id
   111     host = '%s.appspot.com' % app_id
   114 
   112 
   115   remote_api_stub.ConfigureRemoteDatastore(app_id, '/remote_api', auth_func, host)
   113   remote_api_stub.ConfigureRemoteDatastore(app_id, '/remote_api', auth_func, host)
   116   apiproxy_stub_map.apiproxy.RegisterStub('memcache',
       
   117       memcache_stub.MemcacheServiceStub())
       
   118 
   114 
   119   context['deepFetch'] = deepFetch
   115   context['deepFetch'] = deepFetch
   120 
   116 
   121   code.interact('App Engine interactive console for %s' % (app_id,), None, context)
   117   code.interact('App Engine interactive console for %s' % (app_id,), None, context)
   122 
   118