Newbie question: Why does read() method of urllib hang?

dwfreeze dwfreeze at yahoo.com
Tue Feb 12 08:50:54 EST 2002


"Andrew Ward" <winelight at spamcop.net> wrote in message news:<Ry3a8.40197$bP3.337803 at NewsReader>...
> > Andrew, what version of python are you running?
> 
> I am using 2.2 under Windows XP, but in my case, the read() is of a plain
> old single page of html text, no cookies, no nothing complicated!
> 
> Yes, urlopen() is what I would expect to hang, rather than the read(), so
> I'm very puzzled.
> 
> Andrew Ward

Standard "Mee too" post follows:

>>> sys.version
'2.1.2 (#31, Jan 15 2002, 17:28:11) [MSC 32 bit (Intel)]'
>>> import urllib
>>> f = urllib.urlopen('http://slashdot.org').read()

After I execute the urlopen the IDLE shell is definately "hung".



More information about the Python-list mailing list