Hello all! I'm trying to an application to display the lat/lng from GPS device at particular time interval.. But when I tried to test the behaviour of the Canvas it was not working correctly..

Here is the code snippet I used..
Code:
import appuifw, graphics, e32, time

app_lock = e32.Ao_lock()
def quit():
  app_lock.signal()

textUi = u'Hi'
def handle(rect):
  canvas.blit(img,target = [260,60])
  canvas.text((135,75),textUi)

appuifw.app.exit_key_handler = quit
appuifw.app.screen = 'full'
img = graphics.Image.open("e:\\heart.png")
canvas = appuifw.Canvas(redraw_callback = handle)
appuifw.app.body = canvas
appuifw.app.screen = 'full'

handle(None)
time.sleep(2)
canvas.clear()
textUi = u'How r u?'
handle(None)
time.sleep(4)
canvas.clear()
textUi = u'I am fine!'
handle(None)
app_lock.wait()

I have expected the code to print the word Hi! first on the canvas
then after two seconds "time.sleep(2)" print How r u?

then after four secinds print I am fine

But the canvas only printed Hi and then straight away it printed Iam fine after 2 seconds.

The immediate text was not printed.. Is it a problem with the time object or canvas object..
Please help me..