This code will create and write to a new csv file. Unfortunately, it delimits every character, and I haven't figured out how to fix that. If you do, please post how.import arcpy, csv
mxd = arcpy.mapping.MapDocument("YOUR MXD HERE")
layers = arcpy.mapping.ListLayers(mxd)
filepath = "NEW CSV FILE PATH HERE"
writer = csv.writer(file(filepath, 'w'))
for layer in layers:
if layer.supports("dataSource"):
writer.writerow(layer.dataSource)
del writer
EDIT: this worksimport arcpy, csv
mxd = arcpy.mapping.MapDocument("YOUR MXD HERE")
layers = arcpy.mapping.ListLayers(mxd)
filepath = "NEW CSV FILE PATH HERE"
writer = csv.writer(file(filepath, 'wb'))
sourcelist = []
for layer in layers:
if layer.supports("dataSource"):
sourcelist.append(layer.dataSource)
writer.writerow(sourcelist)
del writer