
| Current Path : /proc/thread-self/root/usr/local/lib/python2.7/site-packages/iftlib/test/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : //proc/thread-self/root/usr/local/lib/python2.7/site-packages/iftlib/test/mm.py |
def sync_lists(list1,i,list2,j):
def cmp_with_list(a,b,nr,clist):
try:
return( clist.index(a[nr]) - clist.index(b[nr]) )
except Exception as e:
print e
return(0)
clist = map(lambda x: x[j], list2)
list1.sort(cmp = lambda x,y: cmp_with_list(x,y,i,clist))
zaehler = -1
while (0 == 0):
zaehler = zaehler + 1
print zaehler, len(list1), len(list2)
print list1
print list2
if zaehler >= len(list1):
if zaehler >= len(list2):
break
else:
list1.append(None)
else:
if zaehler >= len(list2):
list2.append(None)
else:
if not list1[zaehler][i] == list2[zaehler][j]:
if list1[zaehler][i] in clist[zaehler:]:
list1.insert(zaehler,None)
else:
list2.insert(zaehler,None)
clist.insert(zaehler,None)
list1 = [(1,1),(2,2),(3,7),(4,5),(5,6),(6,6)]
list2 = [(1,6),(2,5),(3,5),(4,2),(5,3),(6,1),(7,1)]
sync_lists(list1,1,list2,1)
print list1
print list2