|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Threading in Windows
Hello all,
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 Code:
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
Is there something obvious that I am missing? Thanks, Matt |
|
#2
|
||||
|
||||
|
If you run IDLE or open a Python console you should be able to enter the same instructions:
Code:
>>> from threading import Thread >>> dir() ['Thread', '__builtins__', '__doc__', '__name__'] >>> If that does not work then soemthing went wrong with your installation. If it does work then perhaps your program is modifying the PYTHONPATH with sys.path() at some point before the import statement. grim ![]()
__________________
*** Experimental Python Markup CGI V2 *** |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > Threading in Windows |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|