By the da module, I assume you mean the Data Access module and are using the search/update/insert cursor functions. If that is the case, there is another workflow that you can use for arcGIS 10.0 without the da functionality using set.Value.
############ To create new data : The example below is for a table in an fgdb.
import arcpy
from arcpy import InsertCursor
from arcpy import env
env.workspace = "C:\\Temp\\" # assuming all necessary files are in the current workspace
newTable = "newTable"
# arcpy.CreateFeatureDataset_management(env.workspace, newShape) # for poly/point/line features
arcpy.CreateTable_management(env.workspace, newTable)
arcpy.AddField_management(newTable, "Field1", "DOUBLE", "", "", "", "", "NULLABLE")
def listcolumns(x): # use this function to list fields in your feature classes
columnlist = arcpy.ListFields(x)
for col in columnlist:
print"\t%s" % col.name
rows = InsertCursor(newTable)
# Create 100 new rows and add data to them, in the case below I just added sequential id's.
for x in xrange(0, 99):
row = rows.newRow()
row.setValue("Field1", x)
rows.insertRow(row)
############ Updating data : editing a feature class in an fgdb.in this case replacing the 5th digit of a row with another digit.
from arcpy import UpdateCursor
feat = "feature" # name of feature
column1 = "CityCode" # Field name that is found in "feature"
arcpy.AddField_management(feat, "edited_CityCode", "DOUBLE", "", "", "", "", "NULLABLE")
rows = UpdateCursor(feat)
for row in rows:
if len(str(row.getValue(column1))) == 8:
row.edited_CityCode = str(row.getValue(column1))[0:4] + str(0) + str(row.getValue(column1))[5:]
rows.updateRow(row)
else:
print "Code not of length 8, 5th digit not replaced in the edited_CityCode column"
ListLayers
rather thanListFeatureClasses