()
Get the hardware address on Unix by running ifconfig.
Get the hardware address on Unix by running ifconfig.
Get the hardware address on Unix by running ifconfig .
def _ifconfig_getnode():
    """Get the hardware address on Unix by running ifconfig."""
    # This works on Linux ('' or '-a'), Tru64 ('-av'), but not all Unixes.
    keywords = (b'hwaddr', b'ether', b'address:', b'lladdr')
    for args in ('', '-a', '-av'):
        mac = _find_mac_near_keyword('ifconfig', args, keywords, lambda i: i+1)
        if mac:
            return mac
        return None
def _ifconfig_getnode ( ) : # This works on Linux ('' or '-a'), Tru64 ('-av'), but not all Unixes. keywords = ( b'hwaddr' , b'ether' , b'address:' , b'lladdr' ) for args in ( '' , '-a' , '-av' ) : mac = _find_mac_near_keyword ( 'ifconfig' , args , keywords , lambda i : i + 1 ) if mac : return mac return None