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

Matthias Huening mhuening at zedat.fu-berlin.de
Tue Feb 12 09:15:33 EST 2002


dwfreeze at yahoo.com (dwfreeze) wrote in
news:8f070afd.0202120550.45d8873b at posting.google.com: 

> 
> 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".

Hhmm, I can't reproduce this. Everything works just fine.

>>> import sys
>>> import urllib
>>> sys.version
'2.1.1 (#20, Jul 26 2001, 11:38:51) [MSC 32 bit (Intel)]'
>>> f = urllib.urlopen('http://slashdot.org').read()
>>> print f
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML><HEAD><TITLE>Slashdot: News for nerds, stuff that matters</TITLE>
...
etc.etc.




More information about the Python-list mailing list