#!/usr/cs/bin/python2.5 import cgi import headers def readFile (fname): records = [] f = open (fname, 'r') for line in f: # print "Reading: " + line entry = line.split(',') if not len(entry) == 4: print "Bad entry: " + str(entry) entry = map(lambda e: e.lstrip(' \t\n'), entry) entry = map(lambda e: e.rstrip(' \t\n'), entry) records.append(entry) return records def cmpPicno(a, b): if a == '' and b == '': return 0 if a == '': return 1 if b == '': return -1 return cmp(int(a), int(b)) def sortRecords(records, col): # columns: 0 =picture number, 1=last name, 2=first name, 3=institution if col == 0: records.sort (lambda a, b: cmpPicno(a[0], b[0])) elif col <= 3: records.sort (lambda a, b: cmp(a[col], b[col])) else: print "Error: bad sort index" def printTableKey(col): print '' if col==0: print """↓ Key""" else: print """Key""" if col==1: print """↓ Last Name""" else: print """Last Name""" if col == 2: print """↓ First Name""" else: print """First Name""" if col == 3: print """↓ Institution""" else: print """Institution""" print '' def printSortedRecords(col): print """ """ printTableKey(col) records = readFile("data.csv") sortRecords (records, col) oddrow = True for entry in records: if oddrow: td = '" if oddrow: td = '" oddrow = not oddrow printTableKey(col) print "
' else: td = '' # right align first entry for el in entry: print td + str(el) + "' else: td = '' print "
" headers.printHeader ("1999 IEEE Symposium on Security and Privacy") print "

20th IEEE Symposium on Security and Privacy

\n" print "


\n" print '


Photo from the 20th Anniversary Symposium, May 1999
High Resolution Image [High Resolution without Numbers]
\n' print "


\n" form = cgi.FieldStorage() if not form.has_key('col'): colid = 1 else: colid = int(form['col'].value) print "

" printSortedRecords(colid) print "
" print """

Name and affiliation information is from the 1999 Symposium attendee list.


If you can help identify any of the untagged people in the picture, please send the picture number and name to David Shambroom (wds@intersystems.com) and David Evans (evans@cs.virginia.edu). """ headers.printFooter ()