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