[Tutor] How to watch a changing list,
and wait for a certain value to leave?
eric at digitalert.net
Fri Oct 15 09:20:26 CEST 2004
I got some help here before with this program I have started to write,
and I am hung up on something again. Anyway I'm trying to write a simple
program that will watch for a connection to be made by a certain host,
sound the system bell when the connection is made, and then when the
connection is closed have the system bell sound again. Then loop back to
the beginning and start watching again. Here is the only working part I
have so far...
connected = False
while not connected:
for l in o:
connected = True
print "Index Exception"
That works just like I want it to however now I need to figure out a way
to know when the host disconnects. I have tried to use count() function
in conjunction with the less than operator to wait till
"192.168.0.250:21" is <1 , but can't seem to get it right. Can anyone
give me a hint, but not write the entire thing for me, or maybe give me
some insite on a better way to do this?
More information about the Tutor