def undo(): global counter counter-=1 c.delete('blah') try: replicates.pop() print 'popped' print len(replicates) replicatetext = 'Replicates:\n' for i in replicates: well='' if len(i)>1: for w in i: well+=(ft.number_to_well(w)+' ') else: well = ft.number_to_well(i[0]) replicatetext+=(well+'\n') v.set(replicatetext) except IndexError: pass
def replicate(): global counter if selected not in replicates and len(selected)!=0: replicates.append(selected[:]) replicatetext = 'Replicates:\n' for i in replicates: wells='' if len(i)>1: for w in i: wells+=(ft.number_to_well(w)+' ') else: wells = ft.number_to_well(i[0]) replicatetext+=(wells+'\n') v.set(replicatetext) selected[:]=[] counter+=1