[BioPython] how to set proxy for Bio.WWW
Eckhard Lehmann
ecky.l at gmx.de
Tue Nov 4 17:03:35 EST 2003
> Eckhard Lehmann:
> > I want to fetch protein entries from Swissprot, but therefore I need
> > to tell
> > BioPython my proxy server + proxy username and password.
> >
> > Has anyone an idea how to do this?
>
> For unix, set the environment variable 'http_proxy' to the
> proxy, as http://username:password@hostname/ ... I think.
I have managed the auth proxy access by "installing" Jeff Epplers patch
(http://mail.python.org/pipermail/python-list/2000-January/021435.html, and
slightly modified it for Python 2.3, which I use).
Now it works on windows too with a proxy variable setting like
http://username:password@hostname:port/
But it's funny that this patch wasn't applied in the official source of
python - it is in fact very easy to add proxy auth support in this way and it
does not that big changes to urllib...
> not. It does seem that urllib2 supports proxies with passwords.
I had a look at urllib2 too, but it seems a bit overcrowded for simply and
only accessing an auth proxy.
That is the first case, where I have to say that it is better arranged in
perl and LWP. But its also the only case yet ;-).
Ecky ;)
More information about the BioPython
mailing list