This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Andrey Moiseev
Recipients Andrey Moiseev, paul.moore, steve.dower, tim.golden, zach.ware
Date 2021-04-08.09:33:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1617874431.78.0.824806811531.issue43771@roundup.psfhosted.org>
In-reply-to
Content
sys.stdin.readline() in Windows console only allows 512 characters on input per line. So large pastes are truncated at 512 chars, which is a bit inconvenient for prototyping.

The buffer size seems to be determined by BUFSIZ compile time constant:
https://github.com/python/cpython/blob/63298930fb531ba2bb4f23bc3b915dbf1e17e9e1/Modules/_io/winconsoleio.c#L30-L31

In C, I am able to set a larger buffer at runtime with setvbuf() call:
setvbuf(stdin, NULL, 0, 2024);

But I can't seem to make it work through ctypes.cdll.msvcrt.setvbuf
History
Date User Action Args
2021-04-08 09:33:51Andrey Moiseevsetrecipients: + Andrey Moiseev, paul.moore, tim.golden, zach.ware, steve.dower
2021-04-08 09:33:51Andrey Moiseevsetmessageid: <1617874431.78.0.824806811531.issue43771@roundup.psfhosted.org>
2021-04-08 09:33:51Andrey Moiseevlinkissue43771 messages
2021-04-08 09:33:50Andrey Moiseevcreate