How to marshal a function?

Cliff Wells logiplexsoftware at earthlink.net
Wed Nov 14 16:06:39 EST 2001


On Wednesday 14 November 2001 12:54, Cliff Wells wrote:

> >
> > Earlier today, I wondered how to marshal a function, in view of
> > transmitting it to a remote machine and executing it there.  The idea was
> > to not transmit Python source, when the byte-compilation has already been
> > done on this side.

Another reason to use pickle rather than marshal:

The mechanism you are using (remote execution of python code) introduces a 
big security hole (in your current setup this may not be much of an issue for 
you, but think of the children!).  As such you will want some sort of 
security measure in place.  This will undoubtedly involve wrapping the 
pickled code in another structure that includes authentication information.  
Marshal won't support this, but pickle will.  You could also use the wrapper 
to transmit version information for the byte-code.

Regards,

-- 
Cliff Wells
Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 x308
(800) 735-0555 x308




More information about the Python-list mailing list