Overriding Libraries Problem
lorenb2 at bezeqint.net
Mon Jul 21 02:51:24 CEST 2003
I'm doing my first python steps so forgive my Newbies' questions.
Prob is that while using urllib2 I've found out there's a default User-agent
HTTP attribute that is being added automatically.
How can I override this behaviour (preferrable from within my code) ?
I even tried to remove the relevant code directly from my library but
alas the unsolicited attribute kept showing up.
Here's the relevant code:
server_version = "Python-urllib/%s" % __version__
self.addheaders = [('User-agent', server_version)]
I tried to comment out the last code line but in vain...
any suggestions ?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list