ftplib -- how to timeout a connection

James Sleeman bitsy_boffin at cyberdude.com
Sat Apr 28 19:07:32 EDT 2001


"Alex Martelli" <aleaxit at yahoo.com> wrote on
<9cdtd0014nu at news1.newsguy.com> the following text...

> "James Sleeman" <bitsy_boffin at cyberdude.com> wrote in message
> news:9cdqf3$9pf$1 at lust.ihug.co.nz...
>     [snip]
>> to connect.  I want some way of specifying a connect timeout such that
>> if the connection phase (including login) has not completed in n
>> seconds that it should fail (throw an exception) then and there.
>>
>> Can anybody think of a way I can do this ?
> 
> http://www.timo-tasi.org/python/timeoutsocket.py
> 

Ha! Well whaddya know, looks like that is just what the doctor ordered.

Thanx dude.

---
James Sleeman



More information about the Python-list mailing list