summaryrefslogtreecommitdiff
path: root/analyze.py
diff options
context:
space:
mode:
authorHui Lan <lanhui@zjnu.edu.cn>2022-01-16 17:47:42 +0800
committerHui Lan <lanhui@zjnu.edu.cn>2022-01-16 17:47:42 +0800
commit00d3b81d753e4bce78f3641a6d1325f617e78e82 (patch)
tree70030080dc9c79bbce2a7d806d7106a80fe87d22 /analyze.py
parent103a034e1660102214cbc123135fd66acb5a9afa (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.
Diffstat (limited to 'analyze.py')
-rw-r--r--analyze.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/analyze.py b/analyze.py
index 6f95e8f..bef9be9 100644
--- a/analyze.py
+++ b/analyze.py
@@ -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)