text from updating file
It's not clear to me how this is related to pygame so I focus on this part of your question: 


  I would only ask if it's possible with blender to have this result


Yes, you could create an action with two keyframes (start and end position of z coordinate of your cube).

At the right side you see the action "CubeAction" in the Dope Sheet (set to Action Editor)
At the bottom a Keyboard Sensor which is active when Space is pressed and an Action Controller which plays the animation stored in the action.



To dynamically create the text object one idea would be to copy it in the text-editor and use:

bpy.ops.text.to_3d_object(split_lines=True)


This function is probably not available while the game engine is running
For how to load a text into the editor see: How to programmatically load a python script in Text Editor and launch it

How to port this to pygame isn't on topic here.