Trying to figure out how to create self executing python scripts with using the ArcGIS python window. I'm ok (generally) when developing and running scripts inside the python ArcGIS windows but unable to figure out self executing scripts.
For example ....here is a really simple script created to run a "Select Case" to change annotate attributes in one field (BBB) based upon attributes in field AAA. Goal is simply to double click the *.py file and have it run - outside of ArcGIS
# Import arcpy module
import arcpy
# Import env from arcpy as ENV and set the workspace environment
from arcpy import env
env.workspace = "C:/Users/Jeff Reichman/Documents/My GIS Projects/OpenStreetMap/OSM.gdb"
# Local variables:
Input_Field = "C:/Users/Jeff Reichman/Documents/My GIS Projects/OpenStreetMap/OSM.gdb/SaintLouis/SaintLouis_osm_ln"
# Process: Calculate Field
arcpy.CalculateField_management(Input_Field, "BBB", "x", "VB", "dim x as long/nselect case [AAA]/n case 1: x = 100/n case 2: x = 200/n case 3: x = 300/n case 4: x = 400/n case 5: x = 500/n case else: x = -999999/nend select")