Created
April 13, 2016 08:20
-
-
Save MOOOWOOO/26e8c07becb6e4d40080b72267ef80ed to your computer and use it in GitHub Desktop.
获取MAC地址
This file contains 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
# -*- coding:utf-8 -*- | |
from uuid import getnode as get_mac, UUID | |
macaddr=UUID(int=get_mac()).hex[-12:].upper() # FFFFFFFFFFFF | |
return(":".join([macaddr[e:e+2] for e in range(0,11,2)])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment