John,I use PyScripter as my Python development environment, it's very good.OK first you need to create your script and set it up as shown below:# Import system modules
import sys, string, os, arcgisscripting
# Create the Geoprocessor object
gp = arcgisscripting.create(9.3)
# Local variables...Try to get the iteration number that the model is on.
IterationNum = gp.GetParameterAsText(0)
# Do stuff...
gp.addmessage("it = " + IterationNum)
Now add your script to the tool box and ensure that it has a single parameter of type text.Create your model and set your model to run X times. Drag your script which is now a tool onto your model and expose the parameter and set it's value to %n%. Your script will then be able to use it but be aware that a string is passed to the script.Duncan