The workspace environment must be set before using several of the list functions, including ListDatasets, ListFeatureClasses, ListFiles, ListRasters, ListTables, and ListWorkspaces.
It is super, super annoying to use the arcpy.ListFeatureClasses, ...Tables, etc. functions right now because you can't specify a workspace you're checking.
Instead, you have to set the environment to that workspace, first.
arcpy.env.workspace = "whatever.gdb"
for tab in arcpy.ListTables():
print(tab.name)
I would love, love, LOVE if we didn't have to do all that and could just feed it the workspace directly.
Right now, the call for List FeatureClasses, (for example) is as follows :
ListFeatureClasses ({wild_card}, {feature_type}, {feature_dataset}) Could we please change it to
ListFeatureClasses ({wild_card},
{feature_type},
{feature_dataset},
{workspace = arcpy.env.workspace}
)
That is, make it go to the environment workspace by default, unless you specify a different workspace?
I just want to be able to get a list of all the stuff for each gdb in a list without having to change the environment all the time.