HTTP proxy variable

Amit Weisman weismann at netvision.net.il
Sun Nov 11 15:38:19 EST 2001


----- Original Message -----
From: "Hernan M. Foffani" <hfoffani at yahoo.com>
Newsgroups: comp.lang.python
To: <python-list at python.org>
Sent: Sunday, November 11, 2001 8:44 PM
Subject: Re: HTTP proxy variable


> "amit weisman" <weismana at cs.bgu.ac.il> escribiף en el mensaje
> news:mailman.1005491354.22778.python-list at python.org...
> >Hi
> >How does one change the http proxy and ftp proxy of a user ?
>
> Amit!
> It's really hard for us to guess your needs.
> Please don't be so shy when asking for help!
> :-)


I'll try . :-)


> Are you talking about setting http proxy with
> urllib ?
> If so, read the doc Python Library Reference
> chapter 11.3 urrlib.
> At the bottom of urlopen() description it
> explains how to set the proxy data.
>


On Unix system , I run a CGI that activates a Python program . When
activating the CGI script from my shell it is working OK . BUT , when
activating the CGI by an HTML form , it seems as if the Python program can't
connect the net . As I learned that the CGI run as HTTPUSER and not as my
user , I want to assign the http proxy value "by hand" because it is the
only reason I can think of that makes this error .
I tried the
% http_proxy="http://www.someproxy.com:3128" as mentioned in the "Python
Library Reference" but all I get is "Command not found" .

Is there a way of setting the http proxy within Python ?
I saw "class ProxyHandler" in urllib2 and the proxyHandler object , but
couldn't understand all of it (My only attempt made no difference ) .

Any ideas ?
Thanks
Amit








More information about the Python-list mailing list