How to set a timeout?

Matthias Huening mhuening at zedat.fu-berlin.de
Fri Jul 20 13:39:06 CEST 2001


pehr anderson <pehr at alum.mit.edu> wrote:

> What you want is to enable timeoutsockets.
[...]
> http://timo-tasi.org/python/timeoutsocket.py
>

Hey - this is great!
What I like most: it's *very* simple to use. It's just two lines:
   import timeoutsocket
   timeoutsocket.setDefaultSocketTimeout(5)

I couldn't get it to work on my Win98-pc at home (with a modem connection to
the net),
error: "10056, 'Socket is already connected'".
But when I tried it on our Linux-server everything went just fine!

Thank you very much,
Matthias






More information about the Python-list mailing list