#!/usr/bin/python def pretnum(g): h="{:,}".format(int(g)) print g+" -> "+h return h h="" l=0 for char in g: if l % 3 == 2: h+="," l+=1 h+=char print "%s -> %s" % (g, h) return h a=open("exp.conf", "r") b=open("xp.html", "w") for c in a: d=c.split(',') i=0 # For entry for e in d: # Output current limit if i == 0: b.write('Max Level: '+d[0]+'\n') # Break line every 10 entries elif i % 10 == 3: b.write('\n') # Make an empty space every 100 levels if i % 100 == 3 and int(i/100) >= 1: z=0 # loop to make prettier while z < 9: z+=1 b.write('\n') # Do not print headers, race or type as if they were content if i not in [0,1,2]: b.write('' % (i-2, pretnum(e) )) i+=1 # Close this table, repeat the everyline loop b.write('
') b.write('
%d
%s
\n\n')