I am building a script to automate a water outage map(I'm new to Python). In the ArcGIS Desktop 10.1 window the script runs fine. However in Pythonwin and IDLE I get syntax errors(In Pythonwin reads: Failed to run script-syntax error-Invalid syntax). The goal is to use task scheduler to run the script outside of ArcGIS.
import arcpy
mxd = arcpy.mapping.MapDocument(r"X:\Mikes_Workspaces\Outage\Outage.mxd")
df = arcpy.mapping.ListDataFrames(mxd,"Layers")[0]
# Script arguments
OutCurrent = arcpy.GetParameterAsText(0)
if OutCurrent == '#' or not OutCurrent:
OutCurrent = "X:\\Geodatabases\\WebData\\Water_Service.gdb\\OutCurrent" # provide a default value if unspecified
# Local variables:
Service_Group = "Service_Group"
Update_ = "X:\\Mikes_Workspaces\\Outage\\Outage_Board.xls\\Update$"
Group_Out = "Service_Group"
# Process: Add Join
arcpy.AddJoin_management(Service_Group, "Group_", Update_, "Group_Out", "KEEP_COMMON")
# Process: Copy Features
arcpy.CopyFeatures_management(Group_Out, OutCurrent, "", "0", "0", "0")
# Process: Symbology
arcpy.ApplySymbologyFromLayer_management("OutCurrent", "X:\Mikes_Workspaces\Online Shapefiles\Outage_today.lyr")
# Process: Remove Join
arcpy.RemoveJoin_management(Service_Group, "")
mxd.save()
arcpy.RefreshActiveView()
{}
with no other steps?