AnsweredAssumed Answered

Print a list of SDE datasources

Question asked by K0831901 on Jul 2, 2014
Latest reply on Jul 3, 2014 by K0831901
Hi,
I am trying to print out a list of SDE datasources used by some MXDs in a folder. I can successfully print out a list of all the datasources, but I am having no luck separating out the sde connections. I have tried the following and a few other variations on the theme but I can't get anything to print out:

for lyr in arcpy.mapping.ListLayers(mxd):      if lyr.supports("WORKSPACEPATH"):           wsp = lyr.workspacePath           if wsp == ("*.sde"):                print lyr.dataSource


It seems like this should be pretty straight forward but I'm having no luck.
Can anyone point me in the right direction?
Thanks

Outcomes