def remote_api_shell(servername, appid, path, secure, rpc_server_factory):
 os.environ['AUTH_DOMAIN'] = 'appscale'
 remote_api_stub.ConfigureRemoteApi(appid, path, auth_func, servername=servername, save_cookies=True, secure=secure, rpc_server_factory=rpc_server_factory)
 remote_api_stub.MaybeInvokeAuthentication()
 os.environ['SERVER_SOFTWARE'] = 'Development (remote_api_shell)/1.0'
 if (not appid):
  appid = os.environ['APPLICATION_ID']
 sys.ps1 = ('%s> ' % appid)
 if (readline is not None):
  readline.parse_and_bind('tab: complete')
  atexit.register((lambda : readline.write_history_file(HISTORY_PATH)))
  if os.path.exists(HISTORY_PATH):
   readline.read_history_file(HISTORY_PATH)
 if ('' not in sys.path):
  sys.path.insert(0, '')
 preimported_locals = {'memcache': memcache, 'urlfetch': urlfetch, 'users': users, 'db': db, 'ndb': ndb}
 code.interact(banner=BANNER, local=preimported_locals)

def remote_api_shell ( servername , appid , path , secure , rpc_server_factory ) : os . environ [ 'AUTH_DOMAIN' ] = 'appscale' remote_api_stub . ConfigureRemoteApi ( appid , path , auth_func , servername = servername , save_cookies = True , secure = secure , rpc_server_factory = rpc_server_factory ) remote_api_stub . MaybeInvokeAuthentication ( ) os . environ [ 'SERVER_SOFTWARE' ] = 'Development (remote_api_shell)/1.0' if ( not appid ) : appid = os . environ [ 'APPLICATION_ID' ] sys . ps1 = ( '%s> ' % appid ) if ( readline is not None ) : readline . parse_and_bind ( 'tab: complete' ) atexit . register ( ( lambda : readline . write_history_file ( HISTORY_PATH ) ) ) if os . path . exists ( HISTORY_PATH ) : readline . read_history_file ( HISTORY_PATH ) if ( '' not in sys . path ) : sys . path . insert ( 0 , '' ) preimported_locals = { 'memcache' : memcache , 'urlfetch' : urlfetch , 'users' : users , 'db' : db , 'ndb' : ndb } code . interact ( banner = BANNER , local = preimported_locals )
actually run the remote_api_shell .