urllib, urllib2, httplib -- Begging for consolidation?
Jeremy Hylton
jeremy at alum.mit.edu
Thu May 9 17:46:50 EDT 2002
brueckd at tbye.com wrote in message news:<mailman.1020962597.19539.python-list at python.org>...
> On 9 May 2002, Paul Boddie wrote:
>
> > For me, what I've mostly been doing with urllib is to connect to
> > locations and to download files. Indeed, having this functionality in
> > the standard library is incredibly useful when a server
>
> Right, and I'm not in any way advocating the elimination of this, only
> that more of the meat of the functionality be built in the corresponding
> protocol libraries (and not urllib), on top of which is built a thin,
> general-purpose API that does simple "protocol triage" if you will.
It's not at all clear that you want all possible logic associated with
processing HTTP inside httplib. Rather, specific http-based
applications may want to use some set of the features. Thus, I think
it's helpful to have a separation between the base protocol module and
a higher level application toolkit.
That's the rationale for having urllib and urllib2 separate from
httplib, I believe. The rationale for having urllib2 in addition to
urllib is flexibility. urllib requires applications to get exactly one
set of features; urllib2 lets an application pick the features it
needs.
Jeremy
More information about the Python-list
mailing list