How to know if connection is active when using telnetlib?

Wojciech Halicki-Piszko whp at wp.pl
Fri Aug 26 18:06:46 EDT 2005


> 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

Well, in fact what I meant is: I won't to check wether established
connection is still active. I have a reading thread and when I send 'quit'
command to a server it (guess what:)) disconnects. So I get plenty of
unwanted output, I want to avoid this. So the problem is how can I inform
my reader thread it is not longer wanted when _server_ disconnects me? To
my defense: repetition is mother of science (in case you did answer and I
did not get it first time).
 



More information about the Python-list mailing list