How to get my MAC address with python ?

Rick Holbert holbertr at dma.org
Mon Feb 2 13:16:16 EST 2004


olivier Ravard wrote:

> Hi,
> 
> I want to know the MAC address of my local network card with a python
> script.
> I tested the socket module which gives only the IP address.
> Is someone have an idea ?

Here's a url where Mark Hammond explains how to do it on Windows:

http://groups.google.com/groups?oi=djq&selm=an_603363272

On Linux you can parse the output of the ifconfig command as described in
following url:

http://mail.python.org/pipermail/python-list/1999-August/008816.html




More information about the Python-list mailing list