[Chicago] Passing structure
Ed Marshall
esm at logic.net
Thu Feb 25 23:06:39 CET 2010
On Wed, Feb 24, 2010 at 4:20 AM, Goudar, Girish
<Girish.Goudar at goodrich.com>wrote:
> 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 might consider serializing your data structure as JSON or YAML and
passing it that way:
http://docs.python.org/library/json.html
http://pyyaml.org/
For something a littlle more Python-specific, pickle is also available:
http://docs.python.org/library/pickle.html
Perhaps that will give you a few ideas? :)
--
Ed Marshall <esm at logic.net>
Felix qui potuit rerum cognoscere causas.
http://esm.logic.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20100225/5a5b1024/attachment.html>
More information about the Chicago
mailing list