[Tutor] auto referer handler/opener for urlib2?

2008-10-20 Thread xbmuncher
I was reading about urllib2 openers.. Can I make any kind of def or function and make the urllib2 "urlopen" function run through this function first before opening a url? For example, something like a reporthook function. What I want to do is this: def autoReferer(handle): if handle.lastRequest.ur

Re: [Tutor] auto referer handler/opener for urlib2?

2008-10-21 Thread Kent Johnson
On Tue, Oct 21, 2008 at 12:05 AM, xbmuncher <[EMAIL PROTECTED]> wrote: > I was reading about urllib2 openers.. Can I make any kind of def or function > and make the urllib2 "urlopen" function run through this function first > before opening a url? For example, something like a reporthook function.