import urllib response = urllib.urlopen('http://192.168.77.21:9001/v2/coreinfowatcher?watch=1&heartbeat=1') for line in response: print line