On Wed, Feb 24, 2010 at 4:50 PM, Umar Shah <uma...@gmail.com> wrote: > Hi, > > If you are sending over the network, better use a protocol for such > communication, > on python side you can serialize the object into a json or xml string > and let the server handle the data accordingly. >
Use the "struct" module for converting a structure from/to string/struct format. See the documentation of "struct" for details. For simple usage of struct for this, see the recipe http://code.activestate.com/recipes/457669/ --Anand > > regards, > umar > > On Wed, Feb 24, 2010 at 4:14 PM, Goudar, Girish > <girish.gou...@goodrich.com> 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? > > > > > > > > Thanks and Regards, > > > > Girish P.G > > > > > > > > > > > > _______________________________________________ > > BangPypers mailing list > > BangPypers@python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > > Ted Turner - "Sports is like a war without the killing." - > http://www.brainyquote.com/quotes/authors/t/ted_turner.html > _______________________________________________ > BangPypers mailing list > BangPypers@python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- --Anand _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers