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
> 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
> or gzipped?

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



More information about the Python-list mailing list