def setup_workspace(self, workspace_dir):
if not os.path.isdir(workspace_dir):<EOL><INDENT>os.mkdir(workspace_dir)<EOL><DEDENT>arcpy.env.workspace = workspace_dir<EOL>scratch_workspace = os.path.join(workspace_dir, '<STR_LIT>')<EOL>if not os.path.isdir(scratch_workspace):<EOL><INDENT>os.mkdir(scratch_workspace)<EOL><DEDENT>arcpy.env.scratchWorkspace = scratch_workspace<EOL>
Override the default arcpy workspace and scratch workspace