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

Fuzzyman fuzzyman at gmail.com
Mon Mar 14 15:30:38 CET 2005


Alex Stapleton wrote:
> Except wouldn't it of already read the entire file when it opened, or
does
> it occour on the first read()?

Don't know, sorry. Try looking at the source code - it should be
reasonably obvious.

> Also will the data returned from
> handle.read(100) be raw HTTP? In which case what if the encoding is
chunked
> or gzipped?
>

No - you get html - with the http stuff already handled (at least to
the best of my knowledge).

Regards,


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




More information about the Python-list mailing list