[Chicago] Passing structure
asl2 at pobox.com
Thu Feb 25 23:08:19 CET 2010
On Wed, Feb 24, 2010 at 06:20:34PM +0800, Goudar, Girish wrote:
> Hi All,
> I want to pass a structure (which contains int, float, char etc) from a
> client program written in Python to a server program written in C
> (Operating system is DEOS). But the "socket.send" command in Python
> supports only String or Readonly buffer. I want to pass a structure.
> Could you please help me on this?
You can use the struct module (http://docs.python.org/library/struct.html)
to serialize your structure to a string, and then send that.
Aaron Lav (asl2 at pobox.com)
More information about the Chicago