[python-win32] How do you retrieve the name of the network adapters

Roger Upole rwupole at msn.com
Fri Feb 20 22:22:55 EST 2004


You can use 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
   
        Roger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20040220/5a0fa7ed/attachment.html


More information about the Python-win32 mailing list