]> granicus.if.org Git - python/commitdiff
Fix issue #1667. The _Printer() class was using sys.stdin.readline()
authorGuido van Rossum <guido@python.org>
Thu, 20 Dec 2007 18:42:56 +0000 (18:42 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 20 Dec 2007 18:42:56 +0000 (18:42 +0000)
instead of input() to read the user's input (since at some point in
the past raw_input() was removed), but the code used to decode the
input wasn't changed.  Fixed it by going back to input(), which has
since been added back with the same semantics as the old raw_input().

Lib/site.py

index b97f945aa673ee47cdcd08480a0efd2da7fc5d36..4d64d20ccf7457aeff7a8f5b3dc8876129cc1482 100644 (file)
@@ -310,9 +310,7 @@ class _Printer(object):
                 lineno += self.MAXLINES
                 key = None
                 while key is None:
-                    sys.stdout.write(prompt)
-                    sys.stdout.flush()
-                    key = sys.stdin.readline()
+                    key = input(prompt)
                     if key not in ('', 'q'):
                         key = None
                 if key == 'q':