FTP with urllib2 behind a proxy
Bob McCormick
bobmcc at rocketsoftware.com
Tue Feb 24 20:56:10 EST 2004
One more thing....John mentioned environment settings.....can someone point
to where these would be documented for FTP & Proxy? I don't see them in
urllib2.
thanks
bob
At 05:53 PM 2/24/2004 -0800, Bob McCormick wrote:
>Hello,
> I came across this email thread, and I can't seem to get the
> examples to work.
> I am running Proxy+ proxy server. It sets up HTTP proxy on port
> 4480, cnad FTP proxy on 4421.
> I'm not sure how to add the IP addr & host of the proxy server to
> the authorization. Is it something like:
> proxyauth = "http://anonymous@me:137.134.5.20:4421"
> proxy_handler = urllib2.ProxyHandler( { 'http' : proxyauth, 'ftp'
> : proxyauth})
>
>When I try this, and then try
>urllib2.urlopen("ftp://ftp.mathcs.emory.edu/pub/misc/emacs")
>I get
>
>urllib2.URLError: <urlopen error (1, 'address family not supported')>
>
>Does this mean that I don't have an FTP handler defined?
>
>As far as I know, I don't need any special authorizaiton to access my
>proxy server, just the IP and host.
>
>Also, the python doc mentioned in the FTPHandler that it uses blank for
>user and password. Is this really correct? Will this work? Most sites
>want "anonymous" and an email addr.
>
> Thanks for any help or pointers that you can provide.
>
>--
>Bob McCormick email:
>Bob.McCormick at rocketsoftware.com
>Rocket Software Inc., OSS Business Unit
>(formerly TCSI Corp.) voice: +1 510-749-8720
>1080 Marina Village Parkway fax: +1 510-749-8700
>Alameda, CA 94501-1046 USA www: http://www.rocketsoftware.com
More information about the Python-list
mailing list