[Tutor] using windows wide proxy settings

Timmie timmichelsen at gmx-topmail.de
Thu Dec 4 09:26:19 CET 2008


Hello all,
thanks a lot for your answers.

> > The urllib and urllib2 modules also provide a helper function for
> > retrieving proxy info...
> >
> >>>> import urllib2
> >>>> urllib2.getproxies()
> > {'ftp': 'ftp://10.0.0.100:8888', 'http': 'http://10.0.0.100:8888'}
This seems to be the fastest method. Very neat.

Since we use pac scripts I refined my search.

Here is another module tailored to this:
http://code.google.com/p/pacparser

There is a python example at the wiki:
http://code.google.com/p/pacparser/wiki/PacFilesInPythonWebclients

It seems that the script can even test if connection is available.
I was looking for this earlier.

KInd regards,
Timmie



More information about the Tutor mailing list