diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-12-25 12:24:35 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-12-25 12:24:35 (GMT) |
commit | 0fd557647d9957542a68972854a227d2def5f5f3 (patch) | |
tree | b00d297773e829bfff7abcdad226c54e1ab212b9 | |
parent | f47036c1309536c048890c265605b06daf7bdc9c (diff) | |
download | cpython-0fd557647d9957542a68972854a227d2def5f5f3.zip cpython-0fd557647d9957542a68972854a227d2def5f5f3.tar.gz cpython-0fd557647d9957542a68972854a227d2def5f5f3.tar.bz2 |
Issue #20058: sys.stdin.readline() in IDLE now always returns only one line.
-rwxr-xr-x | Lib/idlelib/PyShell.py | 3 | ||||
-rw-r--r-- | Misc/NEWS | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index 6674f4e..55fd357 100755 --- a/Lib/idlelib/PyShell.py +++ b/Lib/idlelib/PyShell.py @@ -1381,6 +1381,9 @@ class PseudoInputFile(PseudoFile): line = self._line_buffer or self.shell.readline() if size < 0: size = len(line) + eol = line.find('\n', 0, size) + if eol >= 0: + size = eol + 1 self._line_buffer = line[size:] return line[:size] @@ -169,6 +169,8 @@ Library IDLE ---- +- Issue #20058: sys.stdin.readline() in IDLE now always returns only one line. + - Issue #19481: print() of string subclass instance in IDLE no longer hangs. - Issue #18270: Prevent possible IDLE AttributeError on OS X when no initial |