Need Help Using list items as output table names in MsACCESS

Cathy James nambo4jb at gmail.com
Wed Mar 28 17:48:35 EDT 2012


Dear Python folks,
I need your help on using list items as output table names in
MsACCESS-new to Python- simple would be better:

import arcpy, os
outSpace = "c:\\data\\Info_Database.mdb\\"
arcpy.overwriteOutput = True
SQL = "Database Connections\\SDE_ReadOnly.sde\\"

inFcList = [(SDE + "sde.GIS.Parcel"),
            (SDE + "sde.GIS.Residence"),
            (SDE + "sde.GIS.Park"),
            (SDE + "sde.GIS.Field"),
            (SDE + "sde.GIS.Business"),
            (SDE + "sde.GIS.Facility"),
            (SDE + "sde.GIS.Tertiary"),
            (SDE + "sde.GIS.KiddieClub")]

#I'd like to crete output tables in the MDB whose names correspond to
input names such that
#"sde.GIS.Parcel" becomes "sde.GIS.Parcel_Buffer_500"
for fc in inFcList:
    arcpy.overwriteOutput = True
    arcpy.Buffer_analysis(fc,(outSpace+fc+"_Buffer_500"), "500 Feet",
"FULL", "ROUND", "ALL", "")
    print Finished
#Thanks in advance



More information about the Python-list mailing list