param1=arcpy.GetParameterAsText(1) for i in range(10): if i >=param1: #eg use a variable instead of calling GetParameterAsText 10x dosomething()
Thanks for the tip and sample code...
I do store every return in a variable, but in the first go of the 'while' loop my script needs to reset one of the variables to an empty string, whereas it needs to have the original input for the second go.
I thought the passed arguments to arcpy.GetParameterAsText() would persist all through the script (I've tried it with shorter version of the script - including the while loop - and that seems to work).
Any more ideas?
>>> param1a=param1b=arcpy.GetParameterAsText(1) >>> print param1a Some Parameter >>> print param1b Some Parameter >>> print param1a==param1b True >>> param1a='Something else' >>> print param1a==param1b False