All pastes #430891 Raw Edit

Something

public python v1 · immutable
·published 2007-04-09 10:53 UTC
rendered paste body
import threadingfrom time import sleepimport gtkclass ThreadWhile(threading.Thread):		def __init__(self):				threading.Thread.__init__(self, name="1")				self.i = 1		#self.timer()			def run(self):		while 1:			print "Timer 1: %i" % self.i			self.i += 1			sleep(1)class ThreadGui(threading.Thread):		def __init__(self):				threading.Thread.__init__(self, name="2")				self.i = 1		#self.timer()			def run(self):		gtk.main()			if __name__ == '__main__':	app1 = ThreadWhile()	app2 = ThreadGui()		app1.start()	app2.start()