In my app I'm trying to write to a file in a seperate thread, but somehow I can't get threading to work correctly. Basically what I'm doing is:

___________________________________
import thread

thread.start_new_thread(self.write, ())

def write(self):
for i in range(2):
appuifw.app.body.set(u"Running: ", i)
time.sleep(5)
___________________________________

When I use this method the UI freezes. I read the piece about active objects in the manual, but that doesn't seem to be what I want. Any suggestions or simple example how to get threads working?

Cheers,
Berco