time inside animation

I want to do something like this:

# get the current time
tk = GetTimeKeeper()
t = tk.Time
#t = renderView.ViewTime

#calculate something with it using a complex python function
s  = myPythonFunction(t)

# display it
text1 = Text()
text1.Text = 'v: %.4f' % v


What is wrong with this approach. It won’t change values inside the animation. Are text fields only evaluted once? Is there a better way?