sys.stdout.write(" & \phantom{}") sys.stdout.write("& U & S & C & P & R & F") sys.stdout.write("\\\\\n") k = list(items)[0] for kk in sorted(items[k].keys()): print("\t\t\t\\midrule") for kkk in sorted(items[k][kk]): killed = int(items[k][kk][kkk][0]) sys.stdout.write("\t\t\t%s & %s & %d "%(utils.shortToFullProjectName(kk) if lastproj != kk else "", kkk, killed)) lastproj = kk maxv = -1 for k in cols: if float("%.2f"%float(items[k][kk][kkk][13])) > maxv: maxv = float("%.2f"%float(items[k][kk][kkk][13])) for k in cols: #print(">%s"%k) #print(">>%s"%kk) #print(">>>%s"%kkk) line = items[k][kk][kkk] #print(">>>> %s"%line)
proj = items[k] lastproj = None for l in body: if l[0] == "%" and l[1:-1] == "captionhere": print("\t\t\\caption{%s}" % k) elif l[0] == "%" and l[1:-1] == "tablehere": for kk in sorted(items[k].keys()): print("\t\t\t\\midrule") for kkk in sorted(items[k][kk]): line = items[k][kk][kkk] sys.stdout.write("\t\t\t%s & %s " % (utils.shortToFullProjectName(kk) if lastproj != kk else "", kkk)) lastproj = kk for pos in display: if pos == -1: sys.stdout.write("& ") else: if "." in line[pos]: val = float(line[pos]) sys.stdout.write("& %.2f " % val) else: val = int(line[pos]) sys.stdout.write("& %d " % val) print("\\\\")
lastproj = None sys.stdout.write("Project & Ope. &\phantom{}") for gt in sorted(items.keys()): sys.stdout.write("& N & E & K & U & I & P & R & F & \phantom{}") sys.stdout.write("\\\\\n") k = list(items)[0] for kk in sorted(items[k].keys()): print("\t\t\t\\midrule") for kkk in sorted(items[k][kk]): sys.stdout.write("\t\t\t%s & %s "%(utils.shortToFullProjectName(kk) if lastproj != kk else "", kkk)) lastproj = kk for k in sorted(items.keys()): line = items[k][kk][kkk] for pos in display: if pos == -1: sys.stdout.write("& ") else: if "." in line[pos]: val = float(line[pos]) sys.stdout.write("& %.2f "%val) else: val = int(line[pos]) sys.stdout.write("& %d "%val)