Skip to content

Instantly share code, notes, and snippets.

@zeffii
Forked from kgleeson/parser.py
Created March 5, 2012 12:53
Show Gist options
  • Save zeffii/1978205 to your computer and use it in GitHub Desktop.
Save zeffii/1978205 to your computer and use it in GitHub Desktop.
import csv
text = csv.reader(open('evoreg.csv', 'rb'), delimiter=';')
for row in text:
print '='*80
IDList = [ ['Name', row[1]],
['Boards', row[2]],
['Age', row[3]],
['Email', row[4]] ]
for ID in IDList:
print '%-10s : %s' % (ID[0] , ID[1])
gamesList = row[5].split(',')
for i in gamesList:
if i is gamesList[0]:
print '%-10s : %s' % ('Games', i)
continue
if len(gamesList) > 1:
print '%-10s : %s' % ('', i)
print '%-10s : %s' % ('SignupDate', row[6])
print '='*80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment