python3 mac.py
from python_arptable import get_arp_table
def get_ip_by_mac(macaddr):
record = next(filter(lambda i: i['HW address'].lower() == macaddr.lower(), get_arp_table()), None)
if record:
return record['IP address']
print(get_ip_by_mac('00:50:56:96:31:06')) # 10.0.20.91
import os
desktop_dir = os.path.expanduser("~/Desktop")
some_file_on_desktop = os.path.join(desktop_dir, 'N')