import threading import GameLogic as g c=g.getCurrentController() o=c.getOwner() class sender(threading.Thread): def run(self): id=0 while 1: print id, self id+=1 if o.init==0: GameLogic.echo = sender() GameLogic.echo.start() o.init=1