import types
import pygame
from StringIO import StringIO
-from log import console, eventLog, hiddenEvents, pprinters
+from log import console, eventLogger
class _EventDispatcher :
def __init__(self) :
try :
del self.registry[eventType][listener]
except KeyError :
- console.warn("no listener to remove")
+ console.debug("no listener to remove")
def dispatchEvents(self) :
events = pygame.event.get()
for event in events :
+ eventLogger.info(event)
listeners = self.registry.get(event.type, {})
- if not hiddenEvents.has_key(event.type):
- #if listeners and not hiddenEvents.has_key(event.type) :
- eventLog.info(pprinters[event.type](event))
for listener in listeners.keys() :
listener(event)