def __init__(self, boxlist=None): self.c_boxlist = ctypes.pointer(libvect.boxlist()) # if set to 0, the list will hold only ids and no boxes self.c_boxlist.contents.have_boxes = 1 if boxlist is not None: for box in boxlist: self.append(box)