proxy autodetection

Simon John simoninusa2001 at yahoo.co.uk
Fri Sep 10 00:36:29 EDT 2004


Here's a snippet from something I wrote to do this, I think the port is
part of "proxies" too - you could just split on the ":"


import win32api
from win32con import *

# internet settings registry key
key =
win32api.RegOpenKeyEx(HKEY_CURRENT_USER,'Software\\Microsoft\\Windows\\CurrentVersion\\Internet
Settings',0,KEY_QUERY_VALUE)

# proxy details
proxies = win32api.RegQueryValueEx(key,'ProxyServer')[0].split(';')
overrides = win32api.RegQueryValueEx(key,'ProxyOverride')[0].split(';')




More information about the Python-list mailing list