Ok, Im going to get to the meat of my problem.

I have some code I've made that downloads a proxy list.

From that proxy list, I'm able to do a for proxy in proxylist to
execute code on each proxy.

Now, what I want to do, is take a proxy, connect to it and request a file from a server via that proxy. To see if it allows requests via it.

I've managed to do that with some luck. But, for some reason (which I guess could be a slow request response) the loop takes forever.

Theres only about 20 proxies in the list.
A schematic of my code so far is:

for self.proxy in self.proxy.list:
-->self.dlm = re.compile(r":")
-->self.lst = self.dlm.split(self.proxy)
-->self.remote = "http://www.example.com/~user/index.html"
-->self.proxy = self.lst[0]
-->self.conn = httplib.HTTP(self.proxy)
-------->self.conn.putrequest("GET", self.remote)
-------->self.conn.putheader("Host", self.remote)
-------->self.conn.putheader("User-agent", "some-agent")
-------->self.chk = self.conn.getresponse()
-------->if self.chk.status == 200:
---------------->print "Connection made!"
-------->print "Connection FAILED!"
-->print "All done!"

Thats a rough idea of the code.

Basically, what i'm trying to do is connect to self.proxy, request www.example.com/~user/index.php, check to see if it returned ok (if so print a message), if it didnt return ok, print a message an go to the next proxy in the list.

What it's doing is running a few connections, then it seems to stop, I hit cntrl-c a few times(each time I do it seems to give me the Connection FAILED error), then it kicks in again but stops shortly after.

Any idea how to make this code actually work correctly?
Any help would be appreciated