Given a feature layer, your Python code could use Describe to find the path of the underlying data, and then parse that to determine if it's a file GDB, personal GDB, or something else. Kind of like the following.# Import system modules
import sys, string, os, arcgisscripting
# Create the Geoprocessor object
gp = arcgisscripting.create()
# Script arguments...
ftrLyr = sys.argv[1]
if ftrLyr == '#':
gp.AddError(" You must provide a feature layer.")
# Check to see if the input exists
if gp.Exists(ftrLyr):
desc = gp.Describe(ftrLyr)
ftrPath = desc.Path
ext = ftrPath.rpartition('.')[2] # Get part after last period.
ext = ext.lower()
if ext == "gdb":
gp.AddMessage(" Workspace is file geodatabase")
elif ext == "mdb":
gp.AddMessage(" Workspace is personal geodatabase")
else:
gp.AddMessage(" Workspace is directory based (shapefile, coverage, etc.)")
Incidentally, you might get some better responses if you asked this question over in the Python forum or the Geoprocessing forum.