Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f47036c commit 0fd5576Copy full SHA for 0fd5576
2 files changed
Lib/idlelib/PyShell.py
@@ -1381,6 +1381,9 @@ def readline(self, size=-1):
1381
line = self._line_buffer or self.shell.readline()
1382
if size < 0:
1383
size = len(line)
1384
+ eol = line.find('\n', 0, size)
1385
+ if eol >= 0:
1386
+ size = eol + 1
1387
self._line_buffer = line[size:]
1388
return line[:size]
1389
Misc/NEWS
@@ -169,6 +169,8 @@ Library
169
IDLE
170
----
171
172
+- Issue #20058: sys.stdin.readline() in IDLE now always returns only one line.
173
+
174
- Issue #19481: print() of string subclass instance in IDLE no longer hangs.
175
176
- Issue #18270: Prevent possible IDLE AttributeError on OS X when no initial
0 commit comments