from urlgrabber import urlopenfo = urlopen("http://url/repomd.xml")data = fo.read()print(data)fo.close()