def addEventListener(self,event,func,raiseErrors=False):
if not isinstance(event,str):<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>if event not in self.eventHandlers:<EOL><INDENT>self.eventHandlers[event]=[]<EOL><DEDENT>self.eventHandlers[event].append([func,raiseErrors])<EOL>
Adds a handler to the given event.

A event may have an arbitrary amount of handlers, though assigning too
many handlers may slow down event processing.

For the format of ``event``\ , see :py:meth:`sendEvent()`\ .

``func`` is the handler which will be executed with two arguments, ``event_type`` and ``data``\ , as supplied to :py:meth:`sendEvent()`\ .

If ``raiseErrors`` is True, exceptions caused by the handler will be re-raised.
Defaults to ``False``\ .