def _execute(self, handler, *args, **kwargs):
        """ executes one callback function """
        # difference to Axel Events: we don't use a timeout and execute all handlers in same thread
        # FIXME: =>possible problem:
        #                       blocking of event firing when user gives a long- or infinitly-running callback function
        # (in Python it doesn't seem possible to forcefully kill a thread with clean ressource releasing,
        #  a thread has to cooperate und behave nice...
        #  execution and killing a process would be possible, but has data corruption problems with queues
        #  and possible interprocess communication problems with given handler/callback function)

        result = None
        exc_info = None

        try:
            result = handler(*args, **kwargs)
        except Exception:
            exc_info = sys.exc_info()
        if exc_info:
            return exc_info
        return result
def _execute ( self , handler , * args , ** kwargs ) : result = None exc_info = None try : result = handler ( * args , ** kwargs ) except Exception : exc_info = sys . exc_info ( ) if exc_info : return exc_info return result
executes one callback function