November 8th, 2004, 12:53 AM
Threading in Windows
I am trying to build a program which will spawn a number of threads each of which will be running concurrently.
I would like to do this in python on windows but I have been unable to get the Thread class imported
Is there something obvious that I am missing?
Traceback (most recent call last):
File "D:/projects/sounds/for random/threading2.py", line 1, in ?
from threading import Thread
ImportError: cannot import name Thread
November 8th, 2004, 07:44 AM
If you run IDLE or open a Python console you should be able to enter the same instructions:
If that does not work then soemthing went wrong with your installation.
>>> from threading import Thread
['Thread', '__builtins__', '__doc__', '__name__']
If it does work then perhaps your program is modifying the PYTHONPATH with sys.path() at some point before the import statement.