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

Pierre Rouleau prouleau at impathnetworks.com
Fri Feb 20 19:33:45 EST 2004


Roger Upole wrote:

> 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
> 

Thanks Roger.

I did not know the WMI.  Looks like we can get a lot of information 
through this.  I'll have to read through the WMI docs to learn more. Any 
suggestion as to what would be the best place to start?

Pierre







More information about the Python-win32 mailing list