urllib (and urllib2) read all data from page on open()?

Alex Stapleton alexs at advfn.com
Mon Mar 14 15:23:29 CET 2005


Except wouldn't it of already read the entire file when it opened, or does
it occour on the first read()? Also will the data returned from
handle.read(100) be raw HTTP? In which case what if the encoding is chunked
or gzipped?

-----Original Message-----
From: python-list-bounces+alexs=advfn.com at python.org
[mailto:python-list-bounces+alexs=advfn.com at python.org]On Behalf Of
Fuzzyman
Sent: 14 March 2005 14:01
To: python-list at python.org
Subject: Re: urllib (and urllib2) read all data from page on open()?


Certianly under urllib2 - handle.read(100) will read the next 100 bytes
(up to) from the handle. Which is the same beahviour as the read method
for files.....

Regards,

Fuzzy
http://www.voidspace.org.uk/python/index.shtml

--
http://mail.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list