I'm writing this in 9.3.1. Basically I'm taking in a string and trying to format it for a tool "Select Layer by Attribute".I'm trying to write a python script to take in a string express, then I'm formatting it and then I'm sending out as a string but I'm having trouble with the output parameter. Can you tell me what is wrong with my last line and what I need to change. The line that is giving me trouble is gp.SetParameterAsText(output)the error is stating Running script StringManipulator...<type 'exceptions.AttributeError'>: Object: Error in parsing arguments for SetParameterAsTextFailed to execute (StringManipulator).Here's my short script
import sys, string, arcgisscripting
gp = arcgisscripting.create(9.3)
userStr = gp.GetParameterAsText(0)
# userStr = sys.argv(0)
strList = userStr.split(" or ")
output = " or ".join(["\"APN\" = \'%s\'" % (item) for item in strList])
gp.SetParameterAsText(output)
#print output
If you want more background I'm why I'm doing this check out this post. http://forums.arcgis.com/threads/210...ed=1#post69372ThanksJ