I use the netifaces module.
import netifaces
print netifaces.interfaces()
but this shows the result below:
[\
Extending on MaxU answer
More accurate/refined way
Select Index from Win32_NetworkAdapterConfiguration WHERE IPEnabled = True or (ServiceName<>''
AND ServiceName<>'AsyncMac'
AND ServiceName<>'VMnetx' AND ServiceName<>'VMnetadapter' AND ServiceName<>'Rasl2tp' AND ServiceName<>'msloop' AND ServiceName<>'PptpMiniport'
AND ServiceName<>'Raspti' AND ServiceName<>'NDISWan' AND ServiceName<>'NdisWan4' AND ServiceName<>'RasPppoe'
AND ServiceName<>'NdisIP' AND Description<>'PPP Adapter.') AND MACAddress is not NULL
and then fire a query with respect to
SELECT * FROM Win32_NetworkAdapter where index=