From ceee13a147e45864d1edd2260fcaa66aa7b3decd Mon Sep 17 00:00:00 2001 From: Ram Rachum Date: Thu, 9 May 2019 08:09:11 +0300 Subject: [PATCH] Make generate_authors.py write binary to support Unicode --- misc/generate_authors.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/misc/generate_authors.py b/misc/generate_authors.py index 6ce76ea..2b5b22e 100644 --- a/misc/generate_authors.py +++ b/misc/generate_authors.py @@ -17,6 +17,7 @@ You probably want to run it this way: import subprocess +import sys def drop_recurrences(iterable): @@ -44,7 +45,8 @@ def iterate_authors_by_chronological_order(): def print_authors(): for author in iterate_authors_by_chronological_order(): - print(author) + sys.stdout.buffer.write(author.encode()) + sys.stdout.buffer.write(b'\n') if __name__ == '__main__':