import arcpy from arcpy import env from arcpy.sa import * env.workspace = "C:/sapyexamples/data" outLDens = LineDensity("roads.shp", "LENGTH", 45, 1000, "SQUARE_MILES") outLDens.save("C:/sapyexamples/output/ldensout")