[twill] add_auth
Titus Brown
titus at caltech.edu
Wed Sep 20 00:31:15 PDT 2006
On Tue, Sep 19, 2006 at 08:04:55PM +0100, John J Lee wrote:
-> [...]
-> > (um, what the above paragraph means is: always use mechanize.Blah, not
-> > urllib2.Blah :-)
-> [...]
->
-> Just noticed this, also from mechanize page, but says it more clearly:
->
->
-> mechanize exports the complete interface of urllib2:
->
-> import mechanize
-> response = mechanize.urlopen("http://www.example.com/")
-> print response.read()
->
-> so anything you would normally import from urllib2 can (and should, by
-> preference, to insulate you from future changes) be imported from
-> mechanize instead. In many cases if you import an object from mechanize it
-> will be the very same object you would get if you imported from urllib2.
-> In many other cases, though, the implementation comes from mechanize,
-> either because bug fixes have been applied or the functionality of urllib2
-> has been extended in some way.
OK, I've swapped out all references to urllib2.
Stava, if you download
http://darcs.idyll.org/~t/projects/twill-latest.tar.gz
the auth stuff now uses mechanize's auth handling. It's still two
months behind John's latest mechanize (because I still have some custom
stuff that hasn't been integrated into mechanize) but it might work.
cheers,
--titus
More information about the twill
mailing list