Why is the statement, inside a thread, not working?

view full story

http://stackoverflow.com – The button is working but the threading is not working at all. What is causing it to fail? thread.start_new_thread(task1) statement is not executed. /var/tmp/p.py: import sys,os import pygtk, gtk, gobject import socket, datetime, threading import ConfigParser import urllib2 import subprocess import threading import thread # Singleton run once import fcntl, sys pid_file = '/var/tmp/program.pid' fp = open(pid_file, 'w') try: fcntl.lockf(fp, fcntl.LOCK_EX | fcntl.LOCK_NB) except IOError: # another instance is running sys.exit(0) # Read config file server="http://blabla" username="stacko (HowTos)