A Telnet question
Gerhard Häring
gerhard.nospam at bigfoot.de
Thu Feb 1 20:15:10 EST 2001
Burkhard Kayser wrote:
>
> Hi,
>
> I'm a newbie in python. My first application is based on telnetlib and I've
> a problem with unreachable hosts.
>
> When I try to connect to a host, wich is currently not reachable,
> socket.connect(), wich is invoked by telnet.open(), times out after some
> minutes. How can I change this timeout to some seconds ?
> I tried it under SuSE 7.0.
Sounds like a typical application for the timeoutsocket module,
available at http://www.timo-tasi.org/python/timeoutsocket.py , which I
downloaded, but never used myself ;-) It's a wrapper around the standard
Python socket module with the additional possibility of setting a
timeout. So it might be just what you need.
Gerhard
--
Sorry for the fake email, please use the real one below to reply.
contact: g e r h a r d @ b i g f o o t . d e
web: http://highqualdev.com
More information about the Python-list
mailing list