Message162912
> Forget other filelike objects. The FileInput class only works with actual files,
No. sys.stdin can be reassigned before using FileInput. And FileInput
has openhook parameter (for read compressed files or get files from Web,
for example).
> so the readlines function should always return at least as many bytes as its first parameter. Is this assumption wrong?
qwert
'qwert\n'
You type five characters "qwert" end press <Enter>. Python immediately
receives these six characters, and returns a result of
sys.stdin.readline(1000). Only six characters, and no one symbol more,
because more characters you have not entered yet.
I believe that for such questions will be more appropriate to use a
mailing list (python-list@python.org, or newsgroup
gmane.comp.python.general on news://news.gmane.org), and not bugtracker. |
|
Date |
User |
Action |
Args |
2012-06-15 15:44:56 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, jaraco, pitrou, Arfrever, r.david.murray, docs@python, zach.ware, jgeralnik |
2012-06-15 15:44:55 | serhiy.storchaka | link | issue15068 messages |
2012-06-15 15:44:55 | serhiy.storchaka | create | |
|