def remote_scp(command, password_list, log_filename=None, transfer_timeout=600, login_timeout=20):
 logging.debug("Trying to SCP with command '%s', timeout %ss", command, transfer_timeout)
 if log_filename:
  output_func = utils.log_line
  output_params = (log_filename,)
 else:
  output_func = None
  output_params = ()
 session = aexpect.Expect(command, output_func=output_func, output_params=output_params)
 try:
  _remote_scp(session, password_list, transfer_timeout, login_timeout)
 finally:
  session.close()

def remote_scp ( command , password_list , log_filename = None , transfer_timeout = 600 , login_timeout = 20 ) : logging . debug ( "Trying to SCP with command '%s', timeout %ss" , command , transfer_timeout ) if log_filename : output_func = utils . log_line output_params = ( log_filename , ) else : output_func = None output_params = ( ) session = aexpect . Expect ( command , output_func = output_func , output_params = output_params ) try : _remote_scp ( session , password_list , transfer_timeout , login_timeout ) finally : session . close ( )
transfer file(s) to a remote host using scp .