How to get Mac address of ethernet port?

Andriy Kornatskyy andriy.kornatskyy at live.com
Sat Jan 11 09:35:19 EST 2014


Sam,

How about this?

from uuid import getnode as get_mac
'%012x' % get_mac()

Thanks.

Andriy Kornatskyy

On Jan 11, 2014, at 4:26 PM, Sam <lightaiyee at gmail.com> wrote:

> I would like to use python to retrieve the mac address of the ethernet port. Can this be done? Thank you.
> -- 
> https://mail.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list