def http_response_iterator(conn, response, size):
 chunk = response.read(size)
 while chunk:
  (yield chunk)
  chunk = response.read(size)
 conn.close()

def http_response_iterator ( conn , response , size ) : chunk = response . read ( size ) while chunk : ( yield chunk ) chunk = response . read ( size ) conn . close ( )
return an iterator for a file-like object .