| 1 | def load(path): |
| 2 | """Read (name, score) records written by writer.dump.""" |
| 3 | records = [] |
| 4 | with open(path) as f: |
| 5 | for line in f: |
| 6 | line = line.strip() |
| 7 | if not line: |
| 8 | continue |
| 9 | name, score = line.split(",") |
| 10 | records.append((name, int(score))) |
| 11 | return records |
| 12 |