Mailing List Archive

thread problem on Linux
Hello!

I have an account on some Linux machine in school, so I thought I
would test Python's portability, one of the reasons why I love it. I
use OS/2, so I only had experience with Python on OS/2, but I
assumed everything should work the same on Linux.

There was Python 1.5.1 on the Linux machine. My first problem was
that it didn't have the thread module. So I downloaded the most
recent RPM of Oliver Andrich with Python 1.5.2 for Linux, but
because I don't have sufficient rights on the machine to install the
whole RPM, I only extracted the one executable file to my home
directory and tried again. The thread module is there, but doesn't
work! thread.start_new_thread doesn't throw an exception, but the
new thread simply doesn't run. When I accidentally pressed Ctrl+D,
it seemed to run for a while, but then the whole script froze.

Would somebody please have an idea of what could be wrong? I admit
that my knowledge of Unix is very limited, so perhaps this is an
issue with Linux????

Bye, Vaclav/2. (vdhome@idas.cz)
thread problem on Linux [ In reply to ]
Vaclav/2 writes:
>
> I have an account on some Linux machine in school, so I thought I
> would test Python's portability, one of the reasons why I love it.
> I use OS/2, so I only had experience with Python on OS/2, but I
> assumed everything should work the same on Linux.
>
> There was Python 1.5.1 on the Linux machine. My first problem was
> that it didn't have the thread module. So I downloaded the most
> recent RPM of Oliver Andrich with Python 1.5.2 for Linux, but
> because I don't have sufficient rights on the machine to install
> the whole RPM, I only extracted the one executable file to my home
> directory and tried again. The thread module is there, but doesn't
> work! thread.start_new_thread doesn't throw an exception, but the
> new thread simply doesn't run. When I accidentally pressed Ctrl+D,
> it seemed to run for a while, but then the whole script froze.
>
> Would somebody please have an idea of what could be wrong? I admit
> that my knowledge of Unix is very limited, so perhaps this is an
> issue with Linux????

Very much. It all depends on your Linux version / distribution,
(threading that works with Python is a fairly recent thing in
Linux). With that information, someone can probably tell you what is
needed to get Python threading working. But if you don't have the
rights to install an RPM, don't get your hopes up...

- Gordon