The ctypes package has a built-in memset function. Ctypes works with Python 2.5, but it is not enabled by default. You will need a separate installation.
def memsetObject(bufferObject): "Note, dangerous" import ctypes data = ctypes.POINTER(ctypes.c_char)() size = ctypes.c_int()
source share