def createHTTPFetcher():
 if (pycurl is None):
  fetcher = Urllib2Fetcher()
 else:
  fetcher = CurlHTTPFetcher()
 return fetcher

def createHTTPFetcher ( ) : if ( pycurl is None ) : fetcher = Urllib2Fetcher ( ) else : fetcher = CurlHTTPFetcher ( ) return fetcher
create a default http fetcher instance prefers curl to urllib2 .