def getWorkspace(inFeature):
desc = arcpy.Describe(inFeature)
path=desc.path.lower()
if path.endswith(".mdb") or path.endswith(".mdb"):
return path
if os.path.isdir(path):#shp
return path
outPath, outFC = os.path.split(path)
return outPath
def getWorkspace(inFeature):
desc = arcpy.Describe(inFeature)
path=desc.path.lower()
if path.endswith(".mdb") or path.endswith(".mdb"):
return path
if os.path.isdir(path):#shp
return path
outPath, outFC = os.path.split(path)
return outPath