Sto cercando di importare il modulo di threading, tuttavia, mi sembra di ottenere errori senza una buona ragione. Qui è il mio codice:Errore di importazione del modulo di threading Python
import threading
class TheThread (threading.Thread):
def run (self):
print 'Insert some thread stuff here.'
print 'I\'ll be executed...yeah....'
print 'There\'s not much to it.'
TheThread.Start()
E gli errori:
Traceback (most recent call last):
File "threading.py", line 1, in <module>
import threading
File "C:\Users\Trent\Documents\Scripting\Python\Threading\threading.py", line
3, in <module>
class TheThread (threading.Thread):
AttributeError: 'module' object has no attribute 'Thread'
Press any key to continue . . .
Python Statistiche
Python 2.7.2 (impostazione predefinita, 12 giugno 2011, 15:08:59) [ MSC v.1500 32 bit (Intel)] sulla vittoria 32
Hai un file chiamato "threading.py" nella tua directory corrente? Se è così, probabilmente sarebbe la causa del fatto che non ci sono attributi Thread. –