Created
June 23, 2019 09:59
-
-
Save samuelbles07/65dd1ae1df81d19cfc7440c17cffc28a to your computer and use it in GitHub Desktop.
Get raspberry pi wifi mac address
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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