"Chris Helck" <[email protected]> wrote in message news:[email protected]...
I have a couple dozen C structures that define binary file records. I
need to read the file and access the records. I need to do this very
efficiantly.

I am aware of the Python struct class, but the C structures contain
arrays of nested structures and I'm not sure if Python struct can handle
it. I am willing to give up portability for speed. I will run the Python
program on the same machine that the file was created on.

Is there some way to directly expose a C struct to Python?

Check out the ctypes library.

-Mark


--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to