25 Aug
2007
25 Aug
'07
11:53 a.m.
I'm giving a talk "An introduction to Twisted" at PyconUK and am trying to come up with some simple examples. One of these, is the attached PortCheck module, that is supposed to attempt connection to a range of ports and report whether they're open, closed, filtered (timeout). It works okay when run against localhost, or another machine on my local network, but I've noticed that when I run it against an internet host, the reactor takes ages to shutdown after scanning all the ports. I wondered if there was anything obviously wrong with the code. Run it as follows from bash: python portcheck.py www.google.co.uk {1..1000} Thanks in advance for any suggestions. -RichardW.