parsl.addresses.address_by_interface

parsl.addresses.address_by_interface(ifname: str) str[source]

Returns the IP address of the given interface name, e.g. ‘eth0’

This is taken from a Stack Overflow answer: https://stackoverflow.com/questions/24196932/how-can-i-get-the-ip-address-of-eth0-in-python#24196955

Parameters:

ifname (str) – Name of the interface whose address is to be returned. Required.