View difference between Paste ID: vQKFMegU and YnH0u0WN
SHOW: | | - or go back to the newest paste.
1
import csv
2
names = open('toget', 'r').read().splitlines() #list of all the MCP names we wanted to get info for
3
rows = []
4-
classesreader = csv.DictReader(open('MCP/conf/classes.csv', 'r'), delimiter=',', quotechar='"', quoting=csv.QUOTE_ALL)
4+
for row in csv.DictReader(open('MCP/conf/classes.csv', 'r'), delimiter=',', quotechar='"', quoting=csv.QUOTE_ALL):
5-
for row in classesreader:
5+
6
7
print "client:"
8-
def find_notch_name(side, name, rows):
8+
9
    notch = ""
10-
        if row['side'] == side and row['name'] == name:
10+
11-
            return row['notch']
11+
        if row['side'] == '0' and row['name'] == name:
12-
    return False
12+
            notch = row['notch']
13
            break
14
    print notch
15
16-
    a = find_notch_name("0", name, rows)
16+
17-
    if a == False:
17+
18-
        print ""
18+
    notch = ""
19-
    else:
19+
20-
        print a
20+
        if row['side'] == '1' and row['name'] == name:
21
            notch = row['notch']
22
            break
23
    print notch