> 2. I got a while loop which does the port scan > itself. How can I end > it while its working ?
using the break statement anywhere inside the loop will exit the loop. > 3. For some reason the scan is too slow (2-3 seconds > for a port). Is > there a way to make it faster (other port scanner > work allot faster... The ports which do not respond are the ones which take most of the time.You can use the timer object to fix the time for each port.For eg. if a port does not respond within .1 sec it can reasonably be expected to be closed.The exact implementation will depend upon your code.You can also use threads to ping more than one port simultaneously. And I loved your microsoft quote :). Cheers > -- > 1. The day Microsoft makes something that doesn't > suck is probably the > day they start making vacuum cleaners. > 2. Unix is user friendly - it's just picky about > it's friends. > 3. Documentation is like sex: when it is good, it is > very, very good. > And when it is bad, it is better than nothing. - > Dick Brandon > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > __________________________________ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor