"Chris Helck" <chris.he...@us.icap.com> wrote in message news:6db873c2999f7547ad0d1c0e6f0c89d704285...@uspsexchs1.us.icap.com...
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