How to access mesh data of an object in a script? I have always had a unique mesh for every MESH type object in blender, to easily access them together in a python script (Iterate through objects and do something with an object and a mesh with the same name). 



Now I want to have a mesh for several objects. I want to export the meshes and the objects separately but for every object, export the mesh it is connected to (its name, index or some identifier) to later connect them in an external program. I already found mesh.users which shows how many objects are using this mesh, but I want to reference all of those objects.
I am exporting to a text file.
So how could I do this in Blender?
I'm not sure what you're asking, but you can retrieve the mesh datablock associated with an object like

ob = bpy.context.object # get the active object for example
mesh = ob.data


The reverse is not directly possible. A mesh can be used by many objects, and the mesh doesn't know/store who its "owners" are. You can build a reverse index however:

mesh_owners = {}
for ob in bpy.data.objects:
    if ob.type == 'MESH':
        mesh_owners.setdefault(ob.data, []).append(ob)

print(mesh_owners[mesh])
# Example output - mesh is used by a one object:
#[bpy.data.objects['Cube.003']]