Skip to content

Instantly share code, notes, and snippets.

@samuelbles07
Created June 23, 2019 09:59
Show Gist options
  • Save samuelbles07/65dd1ae1df81d19cfc7440c17cffc28a to your computer and use it in GitHub Desktop.
Save samuelbles07/65dd1ae1df81d19cfc7440c17cffc28a to your computer and use it in GitHub Desktop.
Get raspberry pi wifi mac address
from uuid import getnode as get_mac
def getMacAddr():
mac = get_mac()
h = iter(hex(mac)[2:].zfill(12))
mc = ":".join(i + next(h) for i in h)
return mc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment