def scp_from(ip_address, keyname, remote_file, local_file):
 key_file = '{}/{}.key'.format(KEY_DIRECTORY, keyname)
 remote_location = '{}:{}'.format(ip_address, remote_file)
 scp_cmd = ['scp', '-i', key_file, remote_location, local_file]
 subprocess.check_call(scp_cmd)

def scp_from ( ip_address , keyname , remote_file , local_file ) : key_file = '{}/{}.key' . format ( KEY_DIRECTORY , keyname ) remote_location = '{}:{}' . format ( ip_address , remote_file ) scp_cmd = [ 'scp' , '-i' , key_file , remote_location , local_file ] subprocess . check_call ( scp_cmd )
copies a file from a remote machine to the local one .