def string_at(p, length=None): if isinstance(p, c_void_p): p = Pointer(p.value) if length: return p.getByteArray(0, length).tostring() return p.getString(0).encode('utf-8')
def __init__(self, value): self.value = Pointer(value)