#!/usr/bin/env python import sys,os K=10 # number of clusters method=2 #used method index=0 #index of the dependant variable nIter=1 #number of replication d = sys.argv[1:] if len(d) > 0: K = int(d[0]) if len(d) > 1: method = int(d[1]) if len(d) > 2: nIter = int(d[2]) kMax=2*K if len(d) > 3: kMax = int(d[3]) print "Parameters:" print "Numbers of Clusters: ", K print "Perturbations method: ", method print "Number of replications: ", nIter print "Max magnitude of perturbations", kMax filename="result_K" + str(K) + "_M" + str(method) + ".txt" io = open(filename, "w")