>>> import arcpy.mapping as ma >>> mxd = ma.MapDocument("current") >>> lyr = ma.ListLayers(mxd,r"U.S. Cities")[0] >>> print lyr.longName New Group Layer\U.S. Cities
>>> for lyr in ma.ListLayers(mxd): ... print lyr.longName ... New Group Layer New Group Layer\U.S. Cities New Group Layer\U.S. Counties (Generalized)
mxd = arcpy.mapping.MapDocument(pathtomxd) df = arcpy.mapping.ListDataFrames(mxd)[0] maplayers = arcpy.mapping.ListLayers(mxd, "", df) for maplyr in maplayers: lyrname = maplyr.name longlyrname = maplyr.longName print "Layer Name is " + lyrname print "Layer Long Name is " + longlyrname