def GetRpcServer(options):
 rpc_server_class = HttpRpcServer
 def GetUserCredentials():
  'Prompts the user for a username and password.'
  global global_status
  st = global_status
  global_status = None
  email = options.email
  if (email is None):
   email = GetEmail(('Email (login for uploading to %s)' % options.server))
  password = getpass.getpass(('Password for %s: ' % email))
  global_status = st
  return (email, password)
 host = (options.host or options.server).lower()
 if ((host == 'localhost') or host.startswith('localhost:')):
  email = options.email
  if (email is None):
   email = 'test@example.com'
   logging.info(('Using debug user %s.  Override with --email' % email))
  server = rpc_server_class(options.server, (lambda : (email, 'password')), host_override=options.host, extra_headers={'Cookie': ('dev_appserver_login="%s:False"' % email)}, save_cookies=options.save_cookies)
  server.authenticated = True
  return server
 return rpc_server_class(options.server, GetUserCredentials, host_override=options.host, save_cookies=options.save_cookies)

def GetRpcServer ( options ) : rpc_server_class = HttpRpcServer def GetUserCredentials ( ) : global global_status st = global_status global_status = None email = options . email if ( email is None ) : email = GetEmail ( ( 'Email (login for uploading to %s)' % options . server ) ) password = getpass . getpass ( ( 'Password for %s: ' % email ) ) global_status = st return ( email , password ) host = ( options . host or options . server ) . lower ( ) if ( ( host == 'localhost' ) or host . startswith ( 'localhost:' ) ) : email = options . email if ( email is None ) : email = 'test@example.com' logging . info ( ( 'Using debug user %s.  Override with --email' % email ) ) server = rpc_server_class ( options . server , ( lambda : ( email , 'password' ) ) , host_override = options . host , extra_headers = { 'Cookie' : ( 'dev_appserver_login="%s:False"' % email ) } , save_cookies = options . save_cookies ) server . authenticated = True return server return rpc_server_class ( options . server , GetUserCredentials , host_override = options . host , save_cookies = options . save_cookies )
returns an instance of an abstractrpcserver .