在github上看到一段代码如下:
def generateKey():
import uuid
import sys
from binascii import unhexlify as unhex
if sys.platform == 'win32':
mac = _ipconfig_getnode()
else:
mac = _ifconfig_getnode()
if mac == None:
mac = hex(_random_getnode())[2:-1]
ud = uuid.uuid1()
ud = ud.hex
hi_time = ud[12:16]
key = hi_time + mac
return unhex(key)
其中hi_time = ud[12:16]不理解,并且在python3 上无法通过编译
求指点,谢谢
python3