A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-September/082173.html below:

[Python-Dev] fileobj.read(float): warning or error?

[Python-Dev] fileobj.read(float): warning or error? [Python-Dev] fileobj.read(float): warning or error?Isaac Morland ijmorlan at cs.uwaterloo.ca
Wed Sep 3 14:55:33 CEST 2008
On Wed, 3 Sep 2008, Greg Ewing wrote:

>> > The Unix read() system call doesn't treat EOF as special other than it
>> > won't return bytes from "beyond" EOF and therefore even when reading a
>> > regular file could return fewer (including 0) bytes than asked for in
>> > the call.
>
> No, that's not right -- a read of more than 0 bytes will
> always block until at least 1 byte is available, or
> something happens that counts as an EOF condition.
>
> However, with some devices it's possible for what
> counts as EOF to happen more than once, e.g. ttys.

Sorry, you're absolutely right.  I was thinking only of the fact that 
read() at EOF is not an error, rather than the blocking behaviour.  It 
sounds like Python read() really is very similar to Unix read() in 
behaviour.

Isaac Morland			CSCF Web Guru
DC 2554C, x36650		WWW Software Specialist
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4