Code: Alles auswählen
import threading
class testthread(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
def __del__(self):
pass
def run(self):
print "Hallo"
thread1 = testthread()
thread1.start()
Code: Alles auswählen
>pythonw -u "threading.py"
Traceback (most recent call last):
File "threading.py", line 1, in <module>
import threading
File "C:\Users\meinname\Desktop\threading.py", line 3, in <module>
class testthread(threading.Thread):
AttributeError: 'module' object has no attribute 'Thread'
>Exit code: 1
Was ist da falsch? Vielen Dank für eure Hilfe[/code]