import Process colours = {'created':'c', 'ready':'r', 'running':'.', 'waiting':'w', 'terminated':'t'} # the interesting bit def render_tasks(PT, title, result): print title line=sep='' for i in range(100): line+="%1d" % (i % 10) print "%20s %s" % (' ',line) for p in PT.pt.keys(): pr = PT.pt[p] t = "process number %2d " % pr.num h = pr.history lenh = len(h) line1="%20s " % t line2=200*[' '] for i in range(100): line2[i]=' ' c = ' '; t=0; i=0 tt1,ts1 = h[t]; while i < 100: #print tt1,ts1,i while i