- Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathschedule_speakers.py
More file actions
Latest commit
32 lines (28 loc) · 903 Bytes
/
Copy pathschedule_speakers.py
File metadata and controls
32 lines (28 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#! /usr/bin/env python
#
# This prorgram reads in a list of students from a file, and sorts them in
# random order
#
importsys
importrandom
importstring
importcsv
date_students= {0:"Oct 16th", 3:"Oct 23rd", 6:"Oct 30th", 9:"Nov 6th", \
12:"Nov 13th", 16:"Nov 20th", 20:"Nov 27th", 24:"Dec 4th",
28:"Dec 11th" }
filename="Student_list.csv"
f=open(filename,"r")
raw_student_list=csv.reader(f, delimiter='\t', quotechar='"')
student_list= []
fora_lineinraw_student_list:
# Column 0 is the student last name, Column 1 is the student first name
# student's name (last name first)
student_list.append( string.strip( a_line[0]+" "+a_line[1] ) )
random.shuffle( student_list, )
counter=0
forninstudent_list :
ifcounterindate_students.keys() :
print"----", date_students[counter]
counter+=1
printcounter, n
print"----"