diff options
author | Guido van Rossum <guido@python.org> | 2007-12-20 18:42:56 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-12-20 18:42:56 (GMT) |
commit | 704b34d9e4481ef35cfe56daabb4a016da9e83aa (patch) | |
tree | 89520242a6d21bdbe602139046b26d542bdcae2b | |
parent | 7d85ba1baec7e0512ab2e904dd752698c1ebd0a2 (diff) | |
download | cpython-704b34d9e4481ef35cfe56daabb4a016da9e83aa.zip cpython-704b34d9e4481ef35cfe56daabb4a016da9e83aa.tar.gz cpython-704b34d9e4481ef35cfe56daabb4a016da9e83aa.tar.bz2 |
Fix issue #1667. The _Printer() class was using sys.stdin.readline()
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().
-rw-r--r-- | Lib/site.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/site.py b/Lib/site.py index b97f945..4d64d20 100644 --- a/Lib/site.py +++ b/Lib/site.py @@ -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': |