March 2019
Beginner
490 pages
12h 40m
English
If you want to query the network interfaces available on your computer, you can use the netifaces module. We can use a third-party library, netifaces, to find out whether there is IPv6 support on your machine. You can install it with the pip command:
pip install netifaces
We can call the interfaces() function from this library to list all interfaces present in the system. This script will give a list of all interfaces, and IPv4 and IPv6 addresses available in the system.
You can find the following code in the check_interfaces.py file:
#!/usr/bin/env python3import itertoolsfrom netifaces import interfaces, ifaddresses, ...
Read now
Unlock full access