pgn-reader 0.2.0

Fast non-allocating reader for chess games in PGN notation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
names = []

for line in open("names.txt"):
    _, tokens = line.rstrip().split("\t", 1)
    names.extend(t for t in tokens.split() if t != "(C)" and not t.replace(".", "").isdigit())

names.sort()

def quot(s):
    return '"%s"' % s

print(", ".join(quot(name) for name in names))