diff options
| author | Hui Lan <lanhui@zjnu.edu.cn> | 2022-01-16 17:47:42 +0800 | 
|---|---|---|
| committer | Hui Lan <lanhui@zjnu.edu.cn> | 2022-01-16 17:47:42 +0800 | 
| commit | 00d3b81d753e4bce78f3641a6d1325f617e78e82 (patch) | |
| tree | 70030080dc9c79bbce2a7d806d7106a80fe87d22 | |
| parent | 103a034e1660102214cbc123135fd66acb5a9afa (diff) | |
analyze.py: accept an exclude.txt with two columns (student number and student name).  So it is easier to prepare exclude.txt from students.txt.
| -rw-r--r-- | analyze.py | 5 | 
1 files changed, 3 insertions, 2 deletions
| @@ -270,8 +270,9 @@ if os.path.exists(EXCLUDE_FILE):      with open(EXCLUDE_FILE) as f:
          for line in f:
              line = line.strip()
 -            if line != '':
 -                lst.append(line)
 +            sno = line.split('\t')[0]
 +            if sno != '':
 +                lst.append(sno)
          for s in lst:
              print('Do not count %s' % (s))
              remove_a_student(student_lst, s)
 | 
