Show More
@@ -4,8 +4,19 | |||
|
4 | 4 | |
|
5 | 5 | from __future__ import absolute_import, print_function |
|
6 | 6 | |
|
7 | import io | |
|
7 | 8 | import sys |
|
8 | 9 | |
|
10 | if sys.version_info[0] >= 3: | |
|
11 | # Prevent \r from being inserted on Windows. | |
|
12 | sys.stdout = io.TextIOWrapper( | |
|
13 | sys.stdout.buffer, | |
|
14 | sys.stdout.encoding, | |
|
15 | sys.stdout.errors, | |
|
16 | newline="\n", | |
|
17 | line_buffering=sys.stdout.line_buffering, | |
|
18 | ) | |
|
19 | ||
|
9 | 20 | state = 'none' |
|
10 | 21 | |
|
11 | 22 | for line in sys.stdin: |
General Comments 0
You need to be logged in to leave comments.
Login now