I'm trying to get this script to get text from a local webpage. The page will return a number which I then want python to print out. Sounds fairly easy! but I'm getting errors and I don't know why..
Heres my code:
Code: Select all
import urllib
url = "http://localhost/pi/green.php/"
response = urllib.urlopen(url)
data = response.read()
print data
[Errno 97] Address family not supported by protocol
Thanks!!