import threading class gui(threading.Thread): __def __init__(self): ____self.a=0 ____....... ____threading.Thread.__init__(self) __def run(self): ____while 1: ______print self.a ______self.a=self.a+1 gui().start() gtk.main() but in this case print function stopping after gtk.main() shows up im sorry i know im asking a lot :/ :/ im a total noob :/ thanks for help EDIT: it starts to print again after i close gtkwindow
class gui(threading.Thread): __def __init__(self): ____self.a=0 ____....... ____threading.Thread.__init__(self) __def run(self): ____f = open('/home/user/t.txt', 'a') ____while 1: ______print self.a ______f.write(str(self.a)) ______self.a=self.a+1 gui().start() gtk.main()