> Notice that when in non-blocking mode, less data than what was
> requested
> may be returned, even if no size parameter was given.
>
> What does "blocking-mode" mean,
Its easier to answer by explaining blocking mode.
In blocking mode the read will wait(block) until size bytes are
available. Thi
Max Noel wrote:
> In any cas, you should try to avoid using file.read without a size
> parameter. If you're processing text files, reading them one line at a
> time would be a good start (for line in open ('filename.txt'): is an
> instance of Best Thing Ever).
Yes, this is good advice, if
On Jul 14, 2005, at 12:26, Negroup - wrote:
"To read a file's contents, call f.read(size), which reads some
quantity of data and returns it as a string. size is an optional
numeric argument. When size is omitted or negative, the entire
contents of the file will be read and returned; it's your p
Negroup - wrote:
> read(...)
> read([size]) -> read at most size bytes, returned as a string.
>
> If the size argument is negative or omitted, read until EOF is reached.
> Notice that when in non-blocking mode, less data than what was requested
> may be returned, even if no size pa
>>> help(f.read)
Help on built-in function read:
read(...)
read([size]) -> read at most size bytes, returned as a string.
If the size argument is negative or omitted, read until EOF is reached.
Notice that when in non-blocking mode, less data than what was requested
may be return