def set_callback(self, callback):
    self.callback = callback
    if (self.handler is not None):
        self.handler.callback = callback
def set_callback(self, callback):
    self.callback = callback
    if (self.handler is not None):
        self.handler.callback = callback