I have code like this.
for p in range(1,1000):
result = False
while result is False:
ret = urllib2.Request(\'http://server/?\'+str(p))
I know this question is a little old, but I thought it might be useful to promote another async solution built on the requests library.
list_of_requests = ['http://moop.com', 'http://doop.com', ...]
from simple_requests import Requests
for response in Requests().swarm(list_of_requests):
print response.content
The docs are here: http://pythonhosted.org/simple-requests/