how to run a python file 20 times with 1000 iterations
<p>i want to run a python file file.py 20 times with 1000 iterations with single run click so that i dont need to click run 20 times manually.</p>

<pre><code>Init()
globalBest=pop[0].chromosome

# Saving Result

fp=open(resultFileName,"w");
fp.write("Iteration,Fitness,Chromosomes\n")

for i in range(0,iterations):
    Crossover()
    Mutation()
    MemoriseGlobalBest()

    if funEval &gt;=maxFunEval:
        break

  if i%20==0:
     print "I:",i,"\t Fitness:", bestFitness
     fp.write(str(i) + "," + str(bestFitness) + "," + str(bestChromosome) + "\n")

print "I:",i+1,"\t Fitness:", bestFitness
fp.write(str(i+1) + "," + str(bestFitness) + "," + str(bestChromosome))    
fp.close()
</code></pre>

<p>You can write another script which call your script 20 times. Make a loop and call the file.py 20 times in it.</p>

python optimization