Getting multiple host adapter IP addresses in Python

Introd Hunting around on google revealed very little on accessing the hosts IP address using Python, especially when it comes to accessing multiple IPs. Thankfully, the answer is simple Using ifaddr Downloading and installing ifaddr is super simple, which is nice compared to some other more complex libraries such as netiface that requires the C++ build tools. After installing ifaddr it really is as simple as the following code to go grab all the IP addresses on the device itself:...

April 15, 2022 · 1 min · Me