This blog post was written by Ghislain Prince, Product Engineer on the Geoprocessing Team in Redlands.
We learned in the Advanced Python Scripting Technical Workshops at UC that many of you who use ArcGIS 9.3 do not yet use the changes we made to the geoprocessor. We just wanted you guys to be aware of this option when writing your Python scripts at 9.3. The 9.3 switch option is specified when the geoprocessor is created; in code it looks like this
gp = arcgisscripting.create(9.3)
Existing (pre-9.3) scripts will obviously not have this option as it didn’t exist before the 9.3 release. We’re sure you’ve already noticed that they continue to work unchanged. To get the 9.3 geoprocessor behavior, it is not enough to simply change gp = arcgisscripting.create() to gp = arcgisscripting.create(9.3) - that does not work, because your code needs to be updated elsewhere in your script to accommodate the changed behavior.
The main goal for this switch is that when you create new scripts in ArcGIS 9.3, you will use the “9.3” geoprocessor and get a much nicer coding experience. This “nicer” experience is achieved because the geoprocessor uses more of Python’s native structures as inputs and outputs.
It’s obvious that the improvements to the geoprocessor make it easier for you to write code and resulting code is easier to read and maintain. Of course the changes are not limited to the List functions; here’s the complete list of differences and a comparison with several code examples.