Retrieving network mask in Python

前端 未结 8 1009
不知归路
不知归路 2021-01-05 07:59

How would one go about retrieving a network device\'s netmask (In Linux preferably, but if it\'s cross-platform then cool)? I know how in C on Linux but I can\'t find a way

8条回答
  •  失恋的感觉
    2021-01-05 08:21

    You can use this library: http://github.com/rlisagor/pynetlinux. Note: I'm the author of the library.

提交回复
热议问题