Am I misusing socket.setdefaulttimeout here?

Syver Enstad syver-en at
Fri Mar 21 00:26:57 CET 2003

Skip Montanaro <skip at> writes:

>     Syver> I was under the definite impression that timeoutsocket also
>     Syver> worked by putting the socket in blocking mode. 
> You meant non-blocking mode, yes?


> Need I continue? ;-)

No, (ducks) :-)

> Timeoutsocket implements a file-like abstraction (TimeoutFile)
> directly on
> top of the socket without calling the socket's makefile method.  

Okay, so that's why it works. I guess I go hung up on the non blocking
part of it, which I thought was the same for the new socket and
timeout socket.

> implements write, read, readline, readlines and flush methods.  I
> suspect
> this would work for the socket module as well, though there are
> probably
> some subtle semantic differences between how TimeoutFile the file-like
> objects returned by sock.makefile operate.
> Skip


Vennlig hilsen 

Syver Enstad

More information about the Python-list mailing list