How to configure proxy authentication when using urllib2?

Jarek Zgoda jzgoda at o2.usun.pl
Sun Feb 19 08:11:11 EST 2006


Licheng Fang napisał(a):

> I use a HTTP proxy to connect to Internet. When I run ulropen command I
> get HTTP Error 407: Proxy authorization required. Could anybody tell me
> how to resolve this? Thanks!

You can build and install opener instance, then all urllib2 calls will
use it.

Some information:
http://www.voidspace.org.uk/python/articles/urllib2.shtml#proxies, one
of many cookbook recipes:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/456195.
Generally, there's much more to google on this topic.

-- 
Jarek Zgoda
http://jpa.berlios.de/



More information about the Python-list mailing list