Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import csv
- names = open('toget', 'r').read().splitlines() #list of all the MCP names we wanted to get info for
- rows = []
- classesreader = csv.DictReader(open('MCP/conf/classes.csv', 'r'), delimiter=',', quotechar='"', quoting=csv.QUOTE_ALL)
- for row in classesreader:
- rows.append(row)
- def find_notch_name(side, name, rows):
- for row in rows:
- if row['side'] == side and row['name'] == name:
- return row['notch']
- return False
- print "client:"
- for name in names:
- a = find_notch_name("0", name, rows)
- if a == False:
- print ""
- else:
- print a
- print "server:"
- for name in names:
- a = find_notch_name("1", name, rows)
- if a == False:
- print ""
- else:
- print a
Advertisement
Add Comment
Please, Sign In to add comment