Lines Matching full:subtree
19 def __init__(self, path_tree, subtree, depth): argument
23 self.subtree = ['/'] + list(filter(bool, subtree.split('/')))
26 for k in self.subtree:
30 raise KeyError(subtree)
44 path = self.subtree[0] + '/'.join(self.subtree[1:] + self.path)
80 def __init__(self, path_tree, subtree, depth): argument
81 super(PathTreeKeyIterator, self).__init__(path_tree, subtree, depth)
187 def keys(self, subtree='/', depth=None): argument
188 return [x for x in self.iterkeys(subtree, depth)]
190 def values(self, subtree='/', depth=None): argument
191 return [x[1] for x in self.iteritems(subtree, depth)]
193 def items(self, subtree='/', depth=None): argument
194 return [x for x in self.iteritems(subtree, depth)]
196 def dataitems(self, subtree='/', depth=None): argument
198 # items explicitly inserted into the tree, rooted at subtree with
199 # depth number of path elements from the subtree root.
207 if subtree == '/' and not depth:
210 return [x for x in self.iteritems(subtree, depth)
213 def iterkeys(self, subtree='/', depth=None): argument
220 return PathTreeKeyIterator(self, subtree, depth)
222 def iteritems(self, subtree='/', depth=None): argument
229 return PathTreeItemIterator(self, subtree, depth)
231 def dumpd(self, subtree='/'): argument
235 for k, v in self.iteritems(subtree):