For weeks I've been using the same code without any problems.
I call SIGNAL within a thread and it's working like a charm.
Then I bring the same module home to the same environment (Ubuntu Jaunty, Python 2.6) and now I'm getting this error: ValueError: signal only works in main thread
After encountering this error, I researched the cause and found that you can't have a signal outside of the main thread. But that's precisely what I've been doing all month.
The code works like this:
In wxpython, I have a progressbar.
I call a thread to test if I have VPN connectivity to a site before starting the main program. During this test, I update the progressbar.
I use a signal so that if doOne() in the ping.py module gets hung up, it'll time out. Even with a timeout in doOne(), I've seen the module hang so I added a signal to ping.py.
My question is not what causes the valueerror, but how is it possible for it to work on one computer but not another? I installed the OS and all modules and maintain both boxes.
I know how to resolve the problem by adding a signal prior to calling the thread but that still leaves me baffled and I hate loose strings.