serializing data structures

Philippe C. Martin philippe at
Mon Jan 31 18:38:17 EST 2005

Thanks a lot.



On Tue, 01 Feb 2005 00:20:01 +0100, Martin v. Löwis wrote:

> Philippe C. Martin wrote:
>> I once wrote something in C to do that, but since python usually has a
>> solution for me ....
> If you use arbitrary data structures, you could use pickle or xmlrpclib
> to marshal the data. If you know the data is restricted to a few
> well-known data types, you could use XDR (Demo/rpc/ or CORBA
> (e.g. through to come up with a wire format.
> Otherwise, if you want to define your own proprietary data format,
> you can probably use the struct module to generate messages according
> to this format.
> However, in any case, you need to define the wire format. Once you made
> a choice, Python can help implement it - but Python cannot chose a wire
> format for you (although pickle comes really close, as does Dopy -
> Regards,
> Martin

More information about the Python-list mailing list