AnsweredAssumed Answered

Conditional Statement to make Scripts Compatible with arcpy and arcgisscripting

Question asked by jasonwarmerdam on Feb 22, 2012
Latest reply on Feb 22, 2012 by JScheirer-esristaff
Hello,
We are running two versions of ArcGIS at our office, 10.1 and 9.3. I am working on updating some of our python scripts and instead of making two different scripts for both, I wanted to see if I could just combine the two and have the geoprocessor catch a particular version with a conditional if statement. I know I could set a boolean sys.argv to prompt the user to enter their version of ArcGIS, but wanted to see if there was a phrase native to either arcpy or arcgisscripting that would trip the inital if statement if the user was running Arc 10 and if not the script would catch in the else statement for Arc 9.3.  

if [ArcGIS 10]:      Do this else [ArcGIS 9.3]:      Do this


Thanks,
Jason

Outcomes