Edit a key value

    :param path: The path key for the value
    :type path: :py:obj:`str`
    :param value: The value to be set
    :type value: :py:obj:`str`
772075
def edit(self, path, value):
    
    _dict = PyVDF.__UseDict
    p = [re.sub('[\[\]]', '', w) for w in PyVDF.__RE_Path_Seperator.findall(path)]
    array = self.getData()
    a = array
    for c in p[:-1]:
      try:
        if not isinstance(a[c], dict):
          a[c] = _dict()
      except KeyError:
        a[c] = _dict()
      a = a[c]
    if value == None:
      a.pop(p[-1], None)
    else:
      a[p[-1]] = value
    self.__data = array
159876
function setByPath(target, path, value) {
  path = pathToArray(path);

  if (! path.length) {
    return value;
  }

  const key = path[0];
  if (isNumber(key)) {
    if (! Array.isArray(target)) {
      target = [];
    }
  }
  else if (! isObject(target)) {
    target = {};
  }

  if (path.length > 1) {
    target[key] = setByPath(target[key], path.slice(1), value);
  }
  else {
    target[key] = value;
  }

  return target;
}
1269476
def setKey(self, key, value):
		
		data = self.getDictionary()
		data[key] = value
		self.setDictionary(data)
24706
def value_for_keypath(obj, path):
    
    val = obj
    for part in path.split('.'):
        match = re.match(list_index_re, part)
        if match is not None:
            val = _extract(val, match.group(1))
            if not isinstance(val, list) and not isinstance(val, tuple):
                raise TypeError('expected list/tuple')
            index = int(match.group(2))
            val = val[index]
        else:
            val = _extract(val, part)
        if val is None:
            return None
    return val
629540
function setValue(source, keyPath, value) {
        var props = keyPath.split('.');
        for (var i = 0; i < props.length - 1; i++) {
            var prop = props[i];
            source = source[prop] = source[prop] || {};
        }
        source[props[props.length - 1]] = value;
    }
1081728
def set(path)
      raise Errno::ENOENT, path unless File.exist?(path)

      self.value = path
    end
1355270
def edit(self, data_src, value):
        
        # check if opening file
        if 'filename' in value:
            items = [k for k, v in self.reg.data_source.iteritems() if
                     v == data_src]
            self.reg.unregister(items)  # remove items from Registry
            # open file and register new data
            self.open(data_src, value['filename'], value.get('path'))
            self.layer[data_src].update(value)
19213
def set_path (self, path):
        
        assert isinstance(path, basestring)
        self.path_ = os.path.normpath(path)
376570
def _set_property_dict_item(obj, prop, key, value):
    ''' 
    '''
    attr = getattr(obj, prop)
    if prop == 'devices':
        device_type = value['type']

        if device_type == 'disk':

            if 'path' not in value:
                raise SaltInvocationError(
                    "path must be given as parameter"
                )

            if value['path'] != '/' and 'source' not in value:
                raise SaltInvocationError(
                    "source must be given as parameter"
                )

        for k in value.keys():
            if k.startswith('__'):
                del value[k]

        attr[key] = value

    else:  # config
        attr[key] = six.text_type(value)

    pylxd_save_object(obj)

    return _pylxd_model_to_dict(obj)
706817
def set_value_for_key(self, key, value):
        
        if key in self.options:
            self.options[key]['value'] = value
1012
def set(self, name, value):
        
        curr = self.values
        parts = name.split('.')

        for i, part in enumerate(parts[:-1]):
            try:
                curr = curr.setdefault(part, {})
            except AttributeError:
                raise InvalidPath('.'.join(parts[:i + 1]))

        try:
            curr[parts[-1]] = value
        except TypeError:
            raise InvalidPath('.'.join(parts[:-1]))
1153927
public boolean set(String path, Object value) {
        jsonStore.clear();
        return JSONPath.set(jsonObject, checkPath(path), value);
    }
342187
def update(self, value):
        
        key = self.name

        # if it's a variable name (otherwise a constant)
        if isinstance(key, str):
            self.env.swapkey(self.local_name, key, new_value=value)

        self.value = value
745605
def set(self, key, value):
        ""
        # if key already in data, update indexes
        if not isinstance(value, dict):
            raise BadValueError(
                'The value {} is incorrect.'
                ' Values should be strings'.format(value))
        _value = deepcopy(value)
        if key in self.data:
            self.delete_from_index(key)
        self.data[key] = _value
        self.update_index(key, _value)
244952
def key_file(self, value):
        """"""
        import os
        if os.path.isfile(value):
            self._keyfile = value
840742
function (path, value) {
    if (typeof path == 'string') {
      path = path.split('.');
    } else if (!Array.isArray(path)) {
      return;
    }

    var propName = path.shift();
    var prop = Model.allProperties[propName] || opts.extra[propName];
    var currKey, currObj;

    if (!prop) {
      return;
    }
    if (path.length == 0) {
      instance[propName] = value;
      return;
    }
    currObj = instance[propName];

    while(currObj && path.length > 0 ) {
      currKey = path.shift();

      if (path.length > 0) {
        currObj = currObj[currKey];
      } else if (currObj[currKey] !== value) {
        currObj[currKey] = value;
        opts.changes.push(propName);
      }
    }
  }
1173498
def modify(key, value, tree)
      # if already set, just change value
      return false unless tree[key]

      tree[key] = value
      true
    end