save config to local file
14871
def write_file(self):
        ''''''
        if self.config:
            try:
                with open(self.config_file, 'w') as file:
                    json.dump(self.config, file)
            except IOError as error:
                print('Error:', error)
                return
74449
def setup_config(command, filename, section, vars):
    """"""
    conf = appconfig('config:' + filename)
    load_environment(conf.global_conf, conf.local_conf)
459495
def save(self):
        ''''''
        if self.app.cfg_mode == 'json':
            with open(self.app.cfg_file, 'w') as opened_file:
                json.dump(self.app.cfg, opened_file)
        else:
            with open(self.app.cfg_file, 'w')as opened_file:
                yaml.dump(self.app.cfg, opened_file)
318699
def copy_config(project_path, output_dir):
    
    project_config = os.path.join(project_path, 'config.json')
    saved_config = os.path.join(output_dir, 'config.json')
    shutil.copy(project_config, saved_config)
1368024
def save_user_config(username, conf_dict, path=settings.LOGIN_FILE):
    
    users = load_users(path=path)
    users[username]["full_name"] = _encode_config(conf_dict)
    save_users(users, path=path)
988818
def save_global(self, verbose=False):
        
        self.save(os.path.expanduser(os.path.join('~', GLOBALCONFIG)), verbose)
230052
def save_configuration_file(self):
        
        if os.path.exists(self.config_file) and not self.config_changed:
            return
        dirname = os.path.dirname(self.config_file)
        try:
            if not os.path.exists(dirname):
                os.makedirs(dirname)
        except (OSError, IOError) as e:
            self.logger.warning("Could not make directory for configuration file: {0}".
                                format(utils.exc_as_decoded_string(e)))
            return
        try:
            with open(self.config_file, 'w') as file:
                csvwriter = csv.writer(file, delimiter='=', escapechar='\\',
                                       lineterminator='\n', quoting=csv.QUOTE_NONE)
                for key, value in self.config_dict.items():
                    csvwriter.writerow([key, value])
            self.config_changed = False
        except (OSError, IOError) as e:
            self.logger.warning("Could not save configuration file: {0}".\
                format(utils.exc_as_decoded_string(e)))
590946
def save(self):
		
		with open(self.configuration_file, 'w') as file_h:
			file_h.write(self._serializer('dumps', self._storage))
1364338
def config_file(dir = Dir.pwd, type = :local, options = {})
      path = normalized_path(dir)
      path = FalkorLib::Git.rootdir(path) if FalkorLib::Git.init?(path)
      raise FalkorLib::Error, "Wrong FalkorLib configuration type" unless FalkorLib.config[:config_files].keys.include?( type.to_sym)
      (options[:file]) ? options[:file] : File.join(path, FalkorLib.config[:config_files][type.to_sym])
    end
513830
private void save(OneOrOther<File, Path> configFile) throws IOException {
		if (configFile.isOne()) {
			File config = configFile.getOne();
			this.saveToWriter(getFileWriter(config));
		} else {
			Path config = configFile.getOther();
			this.saveToWriter(getPathWriter(config));
		}
	}
654536
def write_config_file(path, config):
    """"""
    contents = json.dumps(config, indent=4, separators=(',', ': ')) + '\n'
    try:
        with open(path, 'w') as f:
            f.write(contents)
        return True
    except IOError as ex:
        if ex != errno.ENOENT:
            raise
    return False
256444
def _storeConfig(self, config, configPath):
        
        self.logger.info("Writing to " + str(configPath))
        os.makedirs(os.path.dirname(configPath), exist_ok=True)
        with (open(configPath, 'w')) as yml:
            yaml.dump(config, yml, default_flow_style=False)
424359
def save_config(self):
        
        if not os.path.exists(self._conf_dir):
            os.makedirs(self._conf_dir)
        conf_file = os.path.join(self._conf_dir, "dql.json")
        with open(conf_file, "w") as ofile:
            json.dump(self.conf, ofile, indent=2)
360474
def save(self):
        """"""
        for server, conf in self.servers.iteritems():
            self._add_index_server()
            for conf_k, conf_v in conf.iteritems():
                if not self.conf.has_section(server):
                    self.conf.add_section(server)
                self.conf.set(server, conf_k, conf_v)

        with open(self.rc_file, 'wb') as configfile:
            self.conf.write(configfile)
        self.conf.read(self.rc_file)
590768
def save_config(self, cmd="write mem", confirm=False, confirm_response=""):
        """"""
        return super(RuckusFastironBase, self).save_config(
            cmd=cmd, confirm=confirm, confirm_response=confirm_response
        )
743835
def save config_file
      config_file ||= @config_file
      File.open(config_file, 'w') do |f|
        f.puts self.to_s
      end
    end
783782
def save(self):
        
        with open(self.filename, 'w') as f:
            ujson.dump(self.config, f, indent=4)