I'm trying to transfer a function across a network connection (using asyncore). Is there an easy way to serialize a python function (one that, in this case at least, will have no side effects) for transfer like this?
I would ideally like to have a pair of functions similar to these:
def transmit(func):
    obj = pickle.dumps(func)
    [send obj across the network]
def receive():
    [receive obj from the network]
    func = pickle.loads(s)
    func()
 
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    