newbie puzzled with thread

Thomas Wouters thomas at xs4all.net
Tue Oct 31 17:43:10 EST 2000


On Tue, Oct 31, 2000 at 10:31:47PM -0000, mpaindav at arinc.com wrote:

> I am compiling a source that has "import thread" in it.... and it 
> compile on one box but not on the other. However, on both machine, 
> there is no thread.py, just a thread.h. (I have python 1.5.2 on both)
> Where is the catch? Does it has to do with setting the sys.path?
> Thanks for any suggestion.

The 'thread' module is not a Python module, but a C module. If you look for
'threadmodule.so', there is a chance you'll find it on the machine(s) that
do have threads enabled, but not on the machine that doesn't. Even then, it
might be compiled in statically, in which case you can't see it outside of
Python. Rest assured that if 'import threads' fails, your python does not
have threads enabled, and you need to recompile from source to enable it.
(It isn't just a matter of a missing library, the entire Python interpreter
needs to be 'threaded' for it to work properly.)


-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!




More information about the Python-list mailing list