Start of ctypes python wrapper