I don't know how to get at metadata directly, but you can export the metadata to xml (I believe this tool only works FROM INSIDE PYTHON in SP1 and beyond) and then read through the xml with an ElementTree. I can't remember if the translator doesn't export all FGDC tags or doesn't import all FGDC tags correctly, but it's one of the two, so beware.
import arcpy, sys from xml.etree.ElementTree import ElementTree from xml.etree.ElementTree import Element, SubElement from arcpy import env env.overwriteOutput = True fcpath = r"X:\working\metadata\BlankGDB.gdb\FullMetaFC" # the input feature class translatorpath = r"D:\Program Files (x86)\ArcGIS\Desktop10.0\Metadata\Translator\ARCGIS2FGDC.xml" # the translator file to use - it should be in an installed folder like this xmlfile = r"X:\working\metadata\FullMetaFC.xml" # the output xml file arcpy.ExportMetadata_conversion(fcpath, translatorpath, xmlfile) # export the metadata to xml tree = ElementTree() # make an ElementTree object tree.parse(xmlfile) # read the xml into the ElementTree spot = tree.find("idinfo/citation/citeinfo/title") # find whatever tag you want print spot.text # print the text between the tags
edit: updated paths as Curtis advises below.
fcpath = r"X:\working\metadata\BlankGDB.gdb\FullMetaFC"
That url is not available, but this is the closest I see on Google:
http://www.faculty.umb.edu/michael.trust/A_New_Approach_for_Metadata_with_ArcGIS10.pdf
Yes 10.1 was a long time ago!
The new ArcGIS Pro metadata module is totally the way to go if you just want to dump lists of basic item info from metadata. Much better than what is available in ArcMap for many things: very fast and solid read-write access (compared to Python XML parsing or the old ArcMap conversion toolbox tools).
It works fine as is, I suppose because there were no characters to be escaped...?
>>> "a\z" # "\z" is not a special string literal, so OK 'a\\z' >>> "a\t" # this is "a" followed by <tab> 'a\t' >>>
I am able to list the "Description" portion of the metadata for an individual feature class.