How to get Network Interface Card names in Python?

后端 未结 9 1823
灰色年华
灰色年华 2020-12-06 09:36

I am totally new to python programming so please be patient with me.

Is there anyway to get the names of the NIC cards in the machine etc. eth0, lo? If so how do you

9条回答
  •  甜味超标
    2020-12-06 10:04

    Since this answer pops up in Google when I search for this information, I thought I should add my technique for getting the available interfaces (as well as IP addresses). The very nice module netifaces takes care of that, in a portable manner.

提交回复
热议问题