New submission from Anthony Sottile <asott...@umich.edu>:

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 <rep...@bugs.python.org>
<https://bugs.python.org/issue42175>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to