def writeSettings(repository):
 profilesDirectoryPath = archive.getProfilesPath(getProfileBaseName(repository))
 archive.makeDirectory(os.path.dirname(profilesDirectoryPath))
 archive.writeFileText(profilesDirectoryPath, getRepositoryText(repository))
 for setting in repository.preferences:
  setting.updateSaveListeners()

def writeSettings ( repository ) : profilesDirectoryPath = archive . getProfilesPath ( getProfileBaseName ( repository ) ) archive . makeDirectory ( os . path . dirname ( profilesDirectoryPath ) ) archive . writeFileText ( profilesDirectoryPath , getRepositoryText ( repository ) ) for setting in repository . preferences : setting . updateSaveListeners ( )
write the settings to a file .