def BuildChildList(): children = {} for o in Object.Get(): if o.getParent() is not None: if children.has_key(o.getParent().name): children[o.getParent().name].append(o) else: children[o.getParent().name] = [o] return children