Ich gebe meinem Thread doch die Variable mit?!
Code: Alles auswählen
>>> from threading import Thread, Event
>>> class t(Thread):
            def __init__(self, event):
               super(Thread) # nützt auch nichts
               self.event = event
            def run(self):
               self.event.wait(15)
               print 'ich darf'
>>> e = Event()
>>> a = t(e)
>>> a.start()
Traceback (most recent call last):
  File "<pyshell#16>", line 1, in -toplevel-
    a.start()
AssertionError: Thread.__init__() not called
>>> 


