Setter for **self.__paths** attribute.

        :param value: Attribute value.
        :type value: tuple or list
542129
def paths(self, value):
        

        if value is not None:
            assert type(value) in (tuple, list), "'{0}' attribute: '{1}' type is not 'tuple' or 'list'!".format(
                "paths", value)
            for element in value:
                assert type(element) is unicode, "'{0}' attribute: '{1}' type is not 'unicode'!".format(
                    "paths", element)
                assert os.path.exists(element), "'{0}' attribute: '{1}' directory doesn't exists!".format("paths",
                                                                                                          element)
        self.__paths = value
141663
def wrap_paths(paths):
    # type: (list[str]) -> str
    
    if isinstance(paths, string_types):
        raise ValueError(
            "paths cannot be a string. "
            "Use array with one element instead."
        )
    return ' '.join('"' + path + '"' for path in paths)
950816
def _set_relative_pythonpath(self, value):
        """"""
        self.pythonpath = [osp.abspath(osp.join(self.root_path, path))
                           for path in value]
1187482
def settings(self, value):
        

        if value is not None:
            assert type(value) is dict, "'{0}' attribute: '{1}' type is not 'dict'!".format("settings", value)
        self.__settings = foundations.data_structures.Structure(**{"case_sensitive": False,
                                                                   "whole_word": False,
                                                                   "regular_expressions": False})
        self.__settings.update(value)
402462
def setAttribute(values, value):
    
    if isinstance(value, int):
        values.add().int32_value = value
    elif isinstance(value, float):
        values.add().double_value = value
    elif isinstance(value, long):
        values.add().int64_value = value
    elif isinstance(value, str):
        values.add().string_value = value
    elif isinstance(value, bool):
        values.add().bool_value = value
    elif isinstance(value, (list, tuple, array.array)):
        for v in value:
            setAttribute(values, v)
    elif isinstance(value, dict):
        for key in value:
            setAttribute(
                values.add().attributes.attr[key].values, value[key])
    else:
        values.add().string_value = str(value)
901076
def traverse_setter(obj, attribute, value):
    
    obj.traverse(lambda x: setattr(x, attribute, value))
75790
def nodes(self, value):
        
        # pylint: disable=attribute-defined-outside-init
        self._nodes = value
        self._index2node = {node.index: node for node in self._nodes}
1162875
def set_path(self, path, val):
        
        path = tuple(path.split('.')) if isinstance(path , str) else tuple(path)

        disallowed = [p for p in path if not type(self)._sanitizer.allowable(p)]
        if any(disallowed):
            raise Exception("Attribute strings in path elements cannot be "
                            "correctly escaped : %s" % ','.join(repr(el) for el in disallowed))
        if len(path) > 1:
            attrtree = self.__getattr__(path[0])
            attrtree.set_path(path[1:], val)
        else:
            self.__setattr__(path[0], val)
292678
def path(self, value=None):
        
        if value is not None:
            if not value.startswith('/'):
                value = '/' + value
            encoded_value = unicode_quote(value)
            return URL._mutate(self, path=encoded_value)
        return self._tuple.path
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
1298087
public function setPropertyByPath($path, $value)
    {
        $this->properties = Arrays::setValueByPath($this->properties, $path, $value);
    }
23566
def rules(self, value):
        

        if value is not None:
            assert type(value) in (tuple, list), "'{0}' attribute: '{1}' type is not 'tuple' or 'list'!".format(
                "rules", value)
        self.__rules = value
94514
def path(self, value):
        

        if value is not None:
            assert type(value) is unicode, "'{0}' attribute: '{1}' type is not 'unicode'!".format("path", value)
        self.__path = value
1263246
def source(self, value):
        
        if not isinstance(value, tuple) or len(value) != 2:
            raise AttributeError
        self._source = value
1315063
def multiple_paths_parser(value):
    
    if isinstance(value, six.string_types):
        value = value.split(os.path.pathsep)
    return value
615605
def set(self, key, value):
        
        logger.debug("Settings %s -> %s" % (key, value))
        if key in self.DEFAULTS:
            vtype = type(self.DEFAULTS[key])
        else:
            vtype = type(value)

        if vtype not in self.VALID_KEY_TYPES:
            logger.warn("Invalid key type: %s" % vtype)
            return False

        #for gconf refer to the full key path
        key = self._fix_key(key)

        if vtype is bool:
            self._client.set_bool(key, value)
        elif vtype is str:
            self._client.set_string(key, value)
        elif vtype is int:
            self._client.set_int(key, value)
        elif vtype in (list, tuple):
            #Save every value as a string
            strvalues = [str(i) for i in value]
            #self._client.set_list(key, gconf.VALUE_STRING, strvalues)

        return True
626221
def add_attribute(self, path, name, value):
        
        node = self.add(path)
        node.attribs.append((name, value))
        return node