root = Tree("root") c1 = Tree(dbg.Bytes([83, 69, 67, 67, 79, 78])) c2 = Tree(dbg.Bytes([70, 76, 65, 71])) root.add_child_left(c1) root.add_child_right(c2) patterns = [dbg.Bytes([83, 69, 67, 67, 79, 78]), dbg.Bytes([70, 76, 65, 71]), dbg.Bytes([125]), dbg.Bytes([123])] for p in patterns: found = root.find(p) dbg.Print("found:", found) if found: dbg.Print("obj:", found.get_object())