#CMPS 128 - Project Phase 1 #Josep Valls - 5/15/2008 #jvallsva - 1139975 #Log file analisis for epidemic propagation environment import math nlist=[8,12,16,20,32] klist=[1,2,4,6] for n in nlist: for k in klist: stats=[] for f in range(1,n+1): i=0 numServers=[[0,0]] data=open("log"+str(n)+str(k)+"_"+str(f)+".txt","r").read().splitlines() t=int(data[0]) data.pop(0) p=None for l in data: i+=1 try: exec("d="+l.replace("(","[").replace(")","]")) except: #killing python processes sometimes corrupt the files, so i will just drop this line print n,k,f,"error in line",i if p==None: p=d if numServers[len(numServers)-1][0]