'Send a Python object as a message using pickle to serialize.
See zmq.socket.send_json for details.'

def send_pyobj(self, obj, flags=0, protocol=(-1), callback=None):

    msg = pickle.dumps(obj, protocol)
    return self.send(msg, flags, callback=callback)
