Yep, you can export those. This is a bit of code I was using when I wrote a custom exporter:
if len(mesh.uv_textures)>0:
uvLayer=mesh.uv_textures.active
uvLayer=uvLayer.data
uv=uvLayer[faceIdx]
uv=uv.uv1, uv.uv2, uv.uv3, uv.uv4
uvCoord=uv[vertIndex][0], 1.0-uv[vertIndex][1]
uvCoord=roundVec2(uvCoord)
else:
uvCoord=v.uvco[0], 1.0-v.uvco[1]
uvCoord=roundVec2(uvCoord)
Where vertIndex is enumerating over all the vertices in a face. And faceIdx is enumerating over all the faces in a mesh.
Then when writing:
file.write('u %.6f %.6f \n' %uvCoord) # uv
I should mention that I eventually abandoned the whole writing my own exporter. It's far easier to just write an importer that imports from a common export standard. This also has the additional benefit of your exporter being updated by someone else if Blender ever changes things.
Additionally, if you still want to write your own. Reading how it's done in the "official" exporters is a pretty big help.
For a larger picture of how this code is used:
class processVerts():
def __init__(self, mesh, vert, face, faceIdx, vertIdx, file):
...
def roundVec3(v):
return round(v[0], 6), round(v[1], 6), round(v[2], 6)
v=roundVec3(tuple(vert.co))
...
if len(mesh.uv_textures)>0:
uvLayer=mesh.uv_textures.active
uvLayer=uvLayer.data
uv=uvLayer[faceIdx]
uv=uv.uv1, uv.uv2, uv.uv3, uv.uv4
uvCoord=uv[vertIdx][0], 1.0-uv[vertIdx][1]
uvCoord=roundVec2(uvCoord)
else:
uvCoord=v.uvco[0], 1.0-v.uvco[1]
uvCoord=roundVec2(uvCoord)
...
file.write('u %.6f %.6f \n' %uvCoord) # uv
class processFace():
def __init__(self, mesh, face, faceIdx, file):
...
for vertIdx, vert in enumerate(face.vertices):
processVerts(mesh, meshVerts[vert], face, faceIdx, vertIdx, file)
class processMesh():
def __init__(self, mesh, file):
for faceIdx, face in enumerate(mesh.faces):
processFace(mesh, face, faceIdx, file)