def write_key_file(location, content):
 if (type(location) == type('')):
  location = [location]
 for entry in location:
  path = os.path.abspath(entry)
  with open(path, 'w') as file_handle:
   file_handle.write(content)
  os.chmod(path, 384)

def write_key_file ( location , content ) : if ( type ( location ) == type ( '' ) ) : location = [ location ] for entry in location : path = os . path . abspath ( entry ) with open ( path , 'w' ) as file_handle : file_handle . write ( content ) os . chmod ( path , 384 )
write the specified content to the file locations in the given the list and set the file permissions to 0600 .