New submission from Romuald Brunet <romuald.bru...@gmail.com>:
When run in non-interactive mode and with a TTY stdin, the input() method will not read more than 4095 characters Simple example: >>> foo = input() # paste a 5000 character pasteboard (one line) >>> print(len(foo)) 4095 Note that this will **not** happen when using an interactive shell (using python -i on the same script will not have the 4095 limit) I've traced the issue (I think) to the fgets function called from my_fgets in myreadline.c, but I have no clue as to how one might fix this. ---------- components: Interpreter Core messages: 404179 nosy: Romuald priority: normal severity: normal status: open title: input() method limited to 4095 characters on *NIX type: behavior versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45511> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com