How to know if connection is active when using telnetlib?

Eddie Corns eddie at holyrood.ed.ac.uk
Fri Aug 26 17:23:32 CEST 2005


Wojciech Halicki-Piszko <whp at wp.pl> writes:

>How to know if connection is active after telnetlib.Telnet.open(host,port)?

If open() doesn't throw an exception then you should have a connection you can
start reading/writing with.  Unless you have some special meaning for
'active'?

I'm just basing this on reading telnetlib.py.

Eddie



More information about the Python-list mailing list