detecting enabled network interfaces in win32

Roger Upole rupole at hotmail.com
Sun Oct 17 16:44:43 EDT 2004


If you have pywin32 installed, you can get the info thru WMI:

import win32com.client
wmi=win32com.client.GetObject('winmgmts:')
adapters=wmi.InstancesOf('win32_networkadapter')
for adapter in adapters:
    for p in adapter.Properties_:
        print p.Name, p.Value

     hth
         Roger

"Matthew K Jensen" <matt.torment at gmail.com> wrote in message 
news:a8dfce8c.0410162113.545a74bb at posting.google.com...
> In one of my "because I can" projects, I want to be able to see the
> enabled network interfaces on a machine. I have no clue as to how to
> do this. Any suggestions? 





More information about the Python-list mailing list