urllib2 - iteration over non-sequence

rplobue at gmail.com rplobue at gmail.com
Sat Jun 9 18:58:23 EDT 2007


Thanks for the reply Larry but I am still having trouble.  If i
understand you correctly, your are just suggesting that i add an http://
in front of the address?  However when i run this:

>>> import urllib2
>>> site = urllib2.urlopen('http://www.google.com')
>>> for line in site:
>>>      print line

I am still getting the message:

TypeError: iteration over non-sequence
  File "<stdin>", line 1
    TypeError: iteration over non-sequence




More information about the Python-list mailing list