Pickled objects over the network
nick at craig-wood.com
Wed Jul 18 13:30:06 CEST 2007
Jean-Paul Calderone <exarkun at divmod.com> wrote:
> On Tue, 17 Jul 2007 14:57:16 -0700, Walker Lindley <brotherjenos at gmail.com> wrote:
> >I'm working on a distributed computing program and need to send Python
> >objects over a TCP socket.
> >Hopefully I'm doing something obviously wrong, but if anyone can help based
> >on that description or if you need to see the source, please let me know
> >(it's GPL'd). Thank you so much for any help.
> The obvious thing you're doing wrong is using pickle over a network. ;)
I'd say the obvious thing being done wrong is re-inventing the wheel.
Use pyro instead...
Pyro does use pickle to serialise objects by default. It can use XML
instead for an exploit free RPC at the cost of a bit of speed.
Nick Craig-Wood <nick at craig-wood.com> -- http://www.craig-wood.com/nick
More information about the Python-list