How to get the local mac address?

mwilliams mwilliams at
Thu Dec 15 17:02:45 CET 2005

Well, that kinda depends on what you want the MAC Address of.  Personally (on Unix systems) I 
simply read from a popen('ifconfig') and use a regular expression to parse out the mac address.  
Works perfectly.

Just my 2¢,

More information about the Python-list mailing list