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.url != None: handle.addheader('referer' : handle.lastRequest.url) How can make this auto referer functionality with urllib2?
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor