Using proxy

Ralf Laukien lau at adtranzsig.de
Wed Jul 12 02:11:37 EDT 2000


The solution is quite simple:

import httplib
proxyhost = 'proxy'
proxyport = 8080

h = httplib.HTTP(proxyhost, proxyport)
....


Werner Geuens schrieb:
> 
> I want to retrieve a measurement logfile from a geological measure site at
> regular intervals. The document is available under http form. The function
> urllib.urlretrieve works very well, and cron takes care of the periodic
> launching.
> 
> But after on-site testing with a portable, I came back at the office. I
> tested the log file with my browser (all OK), then started the Python
> script and ... nothing.
> 
> Turns out it's a proxy problem. I have the needed permissions, do web and
> ftp trough the companies proxy all the time. But how do I go about that
> with python? I'm using Python 1.5.2 on WinNT and OS/2, and will be using
> it under Linux (SUSE 6.2 or 6.4) in a near future.
> 
> Any simple solutions?
> 
> --
> werner.geuens at skynet.be (Werner Geuens)
> Research is what I'm doing when I don't know what I'm doing.
>    Wernher von Braun.

--



More information about the Python-list mailing list