EventThread.py 463 Bytes
"""
Dispatch Events to registered handlers.

Author: Georg Hopp <ghopp@spamtitan.com>
"""
import threading

class EventThread(threading.Thread):
    def __init__(self, dispatcher, name):
        super(EventThread, self).__init__()
        self._dispatcher = dispatcher
        self._name       = name

    def run(self):
        print 'start thread'
        self._dispatcher.start(self._name)
        print 'stop thread'

# vim: set ft=python et ts=8 sw=4 sts=4: