> 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 would write a couple of wrapper functions around unpack of struct so
that the actual unpacking is less annoying but otherwise would
continue using the same approach as what you describe.

Cheers,
Daniel
-- 
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to