Use the .as_module() method.
Text_01 contains:
fruit = "apple"
Text_02 contains:
import bpy text_01 = bpy.data.texts['Text_01'].as_module() print(text_01.fruit)
here is a screenshot that might help