eventtracker.py 321 B

12345678910111213
  1. try:
  2. from basemodule import BaseModule
  3. except ImportError:
  4. from modules.basemodule import BaseModule
  5. class EventTracker(BaseModule):
  6. def post_init(self):
  7. for event in self.events:
  8. event.subscribe(self)
  9. def handle(self, event):
  10. print "saw " + event._type + " on line " + event.msg + " from server"