Download Latest Version iphelpers.gz (5.8 kB)
Email in envelope

Get an email when there's a new version of ipHelpers

Home
Name Modified Size InfoDownloads / Week
v.0.1 2011-10-25
README.txt 2011-10-13 1.0 kB
Totals: 2 Items   1.0 kB 0
ipHelpers.py is a python module that uses ctypes to interface to win32 api NotifyAddrChange, GetAdaptersInfo
and GetPerAdapterInfo. For NotifyAddrChange, IpHelpers.py provides both a blocking (NotifyAddrChangeSync) 
and a non-blocking (NotifyAddrChangeAsync) api. For GetAdaptersInfo and GetPerAdapterInfo, ipHelpers.py 
provides a single, non-blocking api (DNSInfo) that simply returns a python dictionary that contains the 
IPV4 address of an adapter as a key to a list of DNS nameservers configured to that adapter.  If an 
adapter is configured to have more than one IPV4 address, only the first is used in the key. However, 
all configured nameservers are returned. There is additional information available that can be printed, 
or DNSInfo can be modified to suit.

NotifyAddrChange.py is a twistd service that demostrates using ipHelpers. The idea is that you can 
get the configuration of the network adapters, and then monitor for changes - e.g., if the user 
changes wifi connections, you'll get notified.
Source: README.txt, updated 2011-10-13