I am developing a multithreaded application in pygtk using quickly and stuck with threads. So i am experimenting with various possibilities and found out that my thread work only when i do something in the gui Here is my code
t = threading.Thread(target=self.calc,args=(treeiter))
t.daemon = True
t.start()
def calc(self,treeiter):
store=self.builder.get_object('liststore1')
per=0
while 1:
print "Calcing and changing percent,per="+str(per)
store.set_value(treeiter,4,str(int(per))+"%")
per+=1
time.sleep(1)
I am trying to update the value in a liststore
by thread but it only get update when i click some button or some other gui events why is that so? why is the thread not running in the background?