Hi Guys,

I am trying to pass a c structure from C to Python. Write the recieved structure at Python to a file, read back the structure from the file at Python and send it back to C.

I am passing the structure as an array of bytes and write it as it is to the file at Python. If I give the format specifier as a string in Py_BuildValue and write it, i dont get the same values when i read back.

Need suggesstions if this can be done in a better way.

Thanks,
vsagar_mb

In the Python manual look under module ctypes.