Estoy intentando importar el módulo de subprocesamiento, sin embargo, parece que recibo errores sin una buena razón. Aquí está mi código:Error de importación del módulo de subprocesamiento de 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()
Y los errores:
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 . . .
estadísticas Python:
Python 2.7.2 (por defecto 12 Jun 2011 15:08:59) [ MSC v.1500 32 bits (Intel)] en Win 32
¿Tiene un archivo llamado "threading.py" en su directorio actual? Si es así, esta probablemente sea la causa de que no haya ningún atributo Thread. –