title: Python : run multiple queries in parallel and get the first finished
body: <p>I try to create a Python script that performs queries to multiple sites. The script works well (I use urllib2) but just for one link. For multiples sites, I make multiple requests one after the other but it is not very powerful.</p>
  
  <p>What is the ideal solution (the threads I guess) to run multiple queries in parallel and stop others when a query returns a specific string please ?</p>
  
  <p>I found this question but I have not found how to change it to stop the remaining threads... :
  <a href="https://stackoverflow.com/questions/3472515/python-urllib2-open-is-slow-need-a-better-way-to-read-several-urls">Python urllib2.urlopen() is slow, need a better way to read several urls</a></p>
  
  <p>Thank you in advance !</p>
  
  <p>(sorry if I made mistakes in English, I'm French ^^)</p>