import arcpy, sys, traceback, os
arcpy.env.workspace = r"C:\tmp\Shp"
outRasterDir = r"E:\VTA\TEST\output\Distance_from_Household\Script_First_10_HH"
maxDistance = 100000
cellSize = 1000
shpList = arcpy.ListFeatureClasses("P*")
for shp in shpList:
#build the name of output raster: directory + shapefilename w/o extension + some text
outRaster = os.path.join(outRasterDir, shp[:-4] + "_EucD")
#run the tool (if you want use defaults instead of maxDistance and cellSize, place "" instead of variable name)
outEucDist = arcpy.sa.EucDistance(shp, maxDistance, cellSize)
If a tool is used manually from ArcToolbox it only processes selected records. I had expected the same to happen using Python but it didn't.