Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os.path
- f = open("map_msg.conf")
- table = []
- for line in f:
- if line[0] != "\n" and line[0] != "/" and line[0] != " ":
- table.append( line[0] )
- i = 1
- while( i < len( line ) ):
- if line[i].isdigit():
- table[ len( table ) -1 ] = table[ len( table ) -1 ] + line[i]
- else:
- break
- i += 1
- a = set(table)
- suffix = [ "frn" ]
- g = open( "diff", "w")
- for file in suffix:
- if os.path.isfile("map_msg_"+ file +".conf"):
- f = open("map_msg_"+ file +".conf")
- t = []
- for line in f:
- if line[0] != "\n" and line[0] != "/" and line[0] != " ":
- t.append( line[0] )
- i = 1
- while( i < len( line ) ):
- if line[i].isdigit():
- t[ len( t ) -1 ] = t[ len( t ) -1 ] + line[i]
- else:
- break
- i += 1
- b = set(t)
- union = a.union(b)
- intersec = a.intersection(b)
- Liste = list(union - intersec)
- g.write( file + ': ' + str( Liste ) + '\n')
- g.close()
- f.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement