On 01/11/2014 07:35 AM, Andriy Kornatskyy wrote: > Sam, > > How about this? > > from uuid import getnode as get_mac > '%012x' % get_mac()
This seems to work if you have only one ethernet adapter. Most computers have two (wired and wireless) adapters. Getting a mac address is platform-specific, and the OP has not specified what OS he is using. On Windows I imagine you'd have to access the WMI subsystem in Windows. On Linux you could access the /sys/devices/virtual/net/<interface name> file in the sysfs filesystem. I'm sure there are other ways. No idea on OS X. -- https://mail.python.org/mailman/listinfo/python-list