What's your choice when handle complicated C structures.
Robert Kern
robert.kern at gmail.com
Wed Nov 5 12:41:46 EST 2008
一首诗 wrote:
> Hi all,
>
> Recently I am writing a small network application with python.
>
> The protocol is binary based and defined in c header files.
>
> Now I'm using the upack function of 'struct' module, but it's really
> annoying to write fmt strings for complicated structures.
>
> What will be your choice when handling binary structures?
I use numpy and its nested dtypes. But then, I use numpy for damn near everything.
http://numpy.scipy.org/
Construct also looks appropriate.
http://construct.wikispaces.com/
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the Python-list
mailing list