[Web-SIG] web-sig sprint at PyCon?
John J Lee
jjl at pobox.com
Fri Jan 9 20:27:39 EST 2004
On Fri, 9 Jan 2004, Jeremy Hylton wrote:
> I notice that activity on this basically stopped in early December. It
> looks like a decent sent of goals has been outlined, but there's no one
> to manage the process or get started on the work.
Just a note that I've got an alpha version of a UserAgent class that was
discussed here. I'm distributing it as part of this package
It's a subclass of urllib2.OpenerDirector, and the base class of
mechanize.Browser, and could be added to urllib2.
Perhaps I should have finished urllib2.OpenerFactory instead of deriving
my class from OpenerDirector, since my class has to have an ugly
._replace_handler() method. OTOH, having it be a subclass seems
conceptually simpler: no new "layer" of code to add more things for the
user to know about (and more code to write, perhaps). Also, my class
mechanize.Browser seems to work nicely as a subclass of
There's also an untested http_get function in there (in _useragent.py,
commented out), for doing an HTTP GET with a Range header.
More information about the Web-SIG