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

Pierre Rouleau prouleau at impathnetworks.com
Fri Feb 20 20:28:07 EST 2004


Pierre Rouleau wrote:

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

If the best place is MSDN, I found what I was looking for in "Platform 
SDK: Windows Management Instrumentation".

Thanks again

Pierre





More information about the Python-win32 mailing list