[issue42175] long lines from interactive stdin are truncated

2020-10-27 Thread Eryk Sun


Eryk Sun  added the comment:

For Windows see issue 41849. The legacy limit (i.e. PYTHONLEGACYWINDOWSSTDIO) 
for reading input via io.FileIO is 8K characters in Windows, but with 
io._WindowsConsoleIO, it's only 512 characters, which is far too small in 
general. The legacy implementation of input() based on C fgets() is capped at 
4K characters in Windows, which is the same as a Linux terminal. The new 
implementation of input() in Windows (i.e. _PyOS_WindowsConsoleReadline) 
increases the limit to 16K characters. I'd like to see both cases increased to 
32K characters, which is the length limit of a command line or file path in 
Windows.

--
nosy: +eryksun

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42175] long lines from interactive stdin are truncated

2020-10-27 Thread Anthony Sottile


Anthony Sottile  added the comment:

indeed! that's it -- you learn something every day :)

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42175] long lines from interactive stdin are truncated

2020-10-27 Thread Ammar Askar


Ammar Askar  added the comment:

This doesn't show up in piping so I think it might be a Linux terminal 
limitation. This thread claims a 4096 limit in cooked terminals, would you mind 
giving one of the work-arounds here a try and see if it that gets rid of it: 
https://unix.stackexchange.com/questions/131105/how-to-read-over-4k-input-without-new-lines-on-a-terminal

--
nosy: +ammar2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42175] long lines from interactive stdin are truncated

2020-10-27 Thread Anthony Sottile


New submission from Anthony Sottile :

this was originally pointed out in a comment on my youtube video here: 
https://youtu.be/Xf_82stIbB8


here's a reproduction:

1. produce 5000 characters of output: python3 -c 'print("a"*5000)'
2. copy that to the clipboard
3. run this: python3 -c 'import sys; print(len(sys.stdin.read()))'
4. paste
5. press enter
6. ^D

I get the following:

$ python3 -c 'import sys; print(len(sys.stdin.read()))'
...
4096

but I expect the value to be 5001 (+1 for the \n)

--
messages: 379783
nosy: Anthony Sottile
priority: normal
severity: normal
status: open
title: long lines from interactive stdin are truncated
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com