Arcpy 第一个函数式的写法[纪念]

import arcpy

def MDBToSHP(inMdb, outPath):
    arcpy.env.workspace = inMdb
    outLocation = outPath
    fcs = arcpy.ListFeatureClasses()
    fcCount = len(fcs)  
    for fc in fcs: 
        # Copy the features from the workspace to a folder
        arcpy.FeatureClassToShapefile_conversion(fc, outLocation)

        print fc
    print fcCount

inMDB = r"D:\07\07.mdb"
outLocation = r"D:\07"
MDBToSHP(inMDB, outLocation)

上一篇博客中有相似的非函数式的写法

转载自:https://blog.csdn.net/sprintwater/article/details/30059795

You may also like...