Can I open Blender internal files with python?
If you run the game by pressing P in Blender, you can simply use the bpy module and access Blender's data while the game is running.

If you don't want to depend on Blender, you're limited to the LibLoad function. However, this doesn't support text datablocks. Writing to blend files is also not possible in that case. IMO it'll be much easier to read and write directly to files on the filesystem, rather than packing them inside blend files.