[Tutor] length of a string? Advice saught

ALAN GAULD alan.gauld at btinternet.com
Thu Jan 28 19:19:25 CET 2010


>> set to a "reasonable" size. If you try to read more than that it
>> will be truncated. This is explained in the read() documentation
>> for files.
>
> ?? files have a buffer size that sets how much is read from the disk
> at once; I don't think it affects how much is read by file.read(). The
> docs for that say,
> "If the size argument is negative or omitted, read all data until EOF
> is reached."

Oops, wrong again! :-)

But the comment re urllib.read() still seems apropos.

Alan G.



More information about the Tutor mailing list