Krenair

Untitled

Nov 20th, 2011
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. for row in csv.DictReader(open('MCP/conf/classes.csv', 'r'), delimiter=',', quotechar='"', quoting=csv.QUOTE_ALL):
  5.     rows.append(row)
  6.  
  7. print "client:"
  8. for name in names:
  9.     notch = ""
  10.     for row in rows:
  11.         if row['side'] == '0' and row['name'] == name:
  12.             notch = row['notch']
  13.             break
  14.     print notch
  15.  
  16. print "server:"
  17. for name in names:
  18.     notch = ""
  19.     for row in rows:
  20.         if row['side'] == '1' and row['name'] == name:
  21.             notch = row['notch']
  22.             break
  23.     print notch
Advertisement
Add Comment
Please, Sign In to add comment