wenn ich folgenden Code ausführe, dann bekomme ich immer eine Fehlermeldung:
Code: Alles auswählen
#!/usr/bin/python
import threading
class MyThread ( threading.thread ):
def run ( self ):
print 'You called my start method, yeah.'
print 'Were you expecting something amazing?'
MyThread().start()
#./threading.py
Traceback (most recent call last):
File "./threading.py", line 2, in <module>
import threading
File "/Users/matze/python/threading.py", line 4, in <module>
class MyThread ( threading.thread ):
AttributeError: 'module' object has no attribute 'thread'
Diese Fehlermeldung bekomme ich scheinbar bei allen Programmen, die threading benutzen.
Kann mir jemand weiterhelfen?