import uuidprint ':'.join(['{:02x}'.format((uuid.getnode() >> i) & 0xff) for i in range(0,8*6,8)][::-1])
来源: http://www.phpxs.com/code/1004985/