Using a frame_change handler was recommended to me for this. (prob what Atom has used in re_phrase)
import bpy
def my_handler(scene):
print("Frame Change", scene.frame_current)
textobj = None
name = "Text" # name of the text object
if name in scene.objects:
textobj = scene.objects[name]
if textobj is not None and textobj.type == "FONT":
textobj.data.body = "Frame %d"%scene.frame_current
else:
print("%s is either none or not a text object"%name)
bpy.app.handlers.frame_change_pre.append(my_handler)
I was using the driver namespace ( i try and use drivers for everything i can) for this until it went buggy … maybe in 2.60 there will be a post on here about it somewhere. Submitted a bug report and the reply from brecht indicated to use the handler instead.