I am trying to write a python script to walk through all folders in my workspace and find and compact all geodatabases in my workspace. I am using the 10.2.2 release.
import acrpy, os
from arcpy import env
for (path, dirs, files) in os.walk(arcpy.env.workspace)
for file in files if ".gdb" in file:
workspaces = arcpy.ListWorkspaces("*", "FileGDB")
for workspace in workspaces: