import types
import pygame
from StringIO import StringIO
+from events import NOTEON
class _EventDispatcher :
def __init__(self) :
events = pygame.event.get()
for event in events :
listeners = self.registry.get(event.type, [])
+ if event.type == NOTEON :
+ print len(listeners)
for listener in listeners :
listener(event)
+ def reset(self) :
+ self.registry = {}
def __repr__(self) :
out = StringIO()