Store the configuration dictionary to a file.
978241
def store(self, config_file):
        

        selfcopy = copy.deepcopy(self)
        selfcopy.filter_exports()

        with open(config_file, 'w') as outf:
            yaml.dump(
                selfcopy.node,
                outf,
                width=80,
                indent=4,
                default_flow_style=False,
                Dumper=ConfigDumper)
873305
def save(self, filename):
        """"""
        filename = pathlib.Path(filename)
        out = []
        keys = sorted(list(self.keys()))
        for key in keys:
            out.append("[{}]".format(key))
            section = self[key]
            ikeys = list(section.keys())
            ikeys.sort()
            for ikey in ikeys:
                var, val = keyval_typ2str(ikey, section[ikey])
                out.append("{} = {}".format(var, val))
            out.append("")

        with filename.open("w") as f:
            for i in range(len(out)):
                # win-like line endings
                out[i] = out[i]+"\n"
            f.writelines(out)
1252907
def save(self):
        """"""
        try:
            os.makedirs(os.path.dirname(self._configfile))
        except:
            pass

        with open(self._configfile, 'w') as f:
            self._config.write(f)
698630
public synchronized void storeConfiguration(Configuration configuration) {
    log.trace("Store configuration {}", configuration);
    byte[] bytes = serializer.encode(configuration);
    configurationBuffer.position(0)
        .writeByte(1)
        .writeInt(bytes.length)
        .write(bytes);
    configurationBuffer.flush();
  }
1016744
def write_config_file_value(key, value):
    

    filename = get_config_file()

    config = _ConfigParser.SafeConfigParser()
    config.read(filename)

    __section = "Environment"

    if not(config.has_section(__section)):
        config.add_section(__section)

    config.set(__section, key, value)

    with open(filename, 'w') as config_file:
        config.write(config_file)
594988
def save_config(self, lookup_key, config):
    
    with self._config_lock:
      self._configs[lookup_key] = config
1242935
def set_config(self, key, value):
        ''''''
        self.config = self.read_file()
        self.config[key] = value
        self.write_file()
956152
def save(self):
        """"""
        with open(self._config_file_path, 'w') as file:
            self._config_parser.write(file)
1228024
def save(yaml_dict, filepath):
    '''
    
    '''
    yamldict.dump(yaml_dict, open(filepath, 'w'), default_flow_style=False)
757928
def _load_config_file(self):
        
        LOGGER.info('Loading configuration from %s', self._file_path)
        if self._file_path.endswith('json'):
            config = self._load_json_config()
        else:
            config = self._load_yaml_config()
        for key, value in [(k, v) for k, v in config.items()]:
            if key.title() != key:
                config[key.title()] = value
                del config[key]
        return flatdict.FlatDict(config)
218567
def Persist(self, config_option):
    """"""
    if not self.writeback:
      raise RuntimeError("Attempting to write a configuration without a "
                         "writeback location.")

    writeback_raw_value = dict(self.writeback.RawData()).get(config_option)
    raw_value = None

    for parser in [self.parser] + self.secondary_config_parsers:
      if parser == self.writeback:
        continue

      config_raw_data = dict(parser.RawData())
      raw_value = config_raw_data.get(config_option)
      if raw_value is None:
        continue
      break

    if writeback_raw_value == raw_value:
      return

    if raw_value is None:
      return

    self.SetRaw(config_option, raw_value)
    self.Write()
90359
def save_config(self, cmd="write mem", confirm=False, confirm_response=""):
        """"""
        return super(OneaccessOneOSBase, self).save_config(
            cmd=cmd, confirm=confirm, confirm_response=confirm_response
        )
236678
def save_config(self, cmd="write", confirm=False, confirm_response=""):
        """"""
        return super(IpInfusionOcNOSBase, self).save_config(
            cmd=cmd, confirm=confirm, confirm_response=confirm_response
        )
710627
public synchronized void storeConfiguration() throws IOException
    {
        OutputStream out = new FileOutputStream(configFilePath);
        configuration.store(out, configFilePath);
    }
277248
def store_json(self, filename, dict_to_store):
        """"""
        filename = os.path.join(
            self.data_dir,
            filename + '.data'
        )
        fileops.dump_dict_to_file(
            dict_to_store,
            filename
        )
544612
def save_config(
        self, cmd="configuration write", confirm=False, confirm_response=""
    ):
        """"""
        output = self.enable()
        output += self.config_mode()
        output += self.send_command(cmd)
        output += self.exit_config_mode()
        return output
774325
def save_configuration(self, configuration_file):
        '''
        '''
        if not isinstance(configuration_file, tb.file.File) and os.path.splitext(configuration_file)[1].strip().lower() != ".h5":
            return save_configuration_to_text_file(self, configuration_file)
        else:
            return save_configuration_to_hdf5(self, configuration_file)