Re: Getting Local MAC Address

2010-04-07 Thread Rebelo
Lawrence D'Oliveiro wrote: In message , Booter wrote: I am new to python ans was wondering if there was a way to get the mac address from the local NIC? What if you have more than one? you can try with netifaces : http://pypi.python.org/pypi/netifaces/0.3 I use them on both Windows and L

Re: Getting Local MAC Address

2010-04-06 Thread Lawrence D'Oliveiro
In message , Booter wrote: > I am new to python ans was wondering if there was a way to get the mac > address from the local NIC? What if you have more than one? -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting Local MAC Address

2010-04-05 Thread Booter
All, Thanks for all of the great solutions! Sorry I wasn't more specific in my post and will keep that in mind for future posts. Just FYI I was using a Windows machine and running Python 2.6. Once again thanks for all of your help! Gerad -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting Local MAC Address

2010-04-04 Thread Michael Torrie
On 04/02/2010 04:01 PM, Dan McLeran wrote: > which is why my OP stated the solution was for windows: > > "for windows parse > p.stdout.read():" Gotcha. Definitely missed that! -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting Local MAC Address

2010-04-02 Thread Frank Millman
"Booter" wrote in message news:ec6d247c-a6b0-4f33-a36b-1d33eace6...@k19g2000yqn.googlegroups.com... Hello all, I am new to python ans was wondering if there was a way to get the mac address from the local NIC? Thanks for your help. Gerad This is what I use - def

Re: Getting Local MAC Address

2010-04-02 Thread Steve Holden
Booter wrote: > Hello all, > > I am new to python ans was wondering if there was a way to get the mac > address from the local NIC? > > Thanks for your help. > >>> import uuid >>> uuid.getnode() 246090452741227L >>> This is supposed to return the MAC address, but I am not sure it does. The docu

Re: Getting Local MAC Address

2010-04-02 Thread Michael Torrie
On 04/02/2010 02:14 PM, Booter wrote: > I am new to python ans was wondering if there was a way to get the mac > address from the local NIC? As Dan has indicated, you have to Popen an external command to get this information. Every OS has different commands and syntaxes for this. You'll have to h

Re: Getting Local MAC Address

2010-04-02 Thread Michael Torrie
On 04/02/2010 03:30 PM, Dan McLeran wrote: > i'm running python 2.6 on win xp sp3 and i get: Your code isn't portable to non-Windows OS's. On my Mac and on my Linux workstations it simply doesn't work. Using '/usr/sbin/ifconfig' as the executable name in Popen does work, however. The OP didn't

Re: Getting Local MAC Address

2010-04-02 Thread danmcle...@yahoo.com
On Apr 2, 2:52 pm, "danmcle...@yahoo.com" wrote: > On Apr 2, 2:14 pm, Booter wrote: > > > Hello all, > > > I am new to python ans was wondering if there was a way to get the mac > > address from the local NIC? > > > Thanks for your help. > > > Gerad > > for windows parse p.stdout.read(): > > impo

Re: Getting Local MAC Address

2010-04-02 Thread Irmen de Jong
On 2-4-2010 22:55, danmcle...@yahoo.com wrote: On Apr 2, 2:52 pm, "danmcle...@yahoo.com" wrote: On Apr 2, 2:14 pm, Booter wrote: Hello all, I am new to python ans was wondering if there was a way to get the mac address from the local NIC? Thanks for your help. Gerad for windows par

Re: Getting Local MAC Address

2010-04-02 Thread danmcle...@yahoo.com
On Apr 2, 2:52 pm, "danmcle...@yahoo.com" wrote: > On Apr 2, 2:14 pm, Booter wrote: > > > Hello all, > > > I am new to python ans was wondering if there was a way to get the mac > > address from the local NIC? > > > Thanks for your help. > > > Gerad > > for windows parse p.stdout.read(): > > impo

Re: Getting Local MAC Address

2010-04-02 Thread danmcle...@yahoo.com
On Apr 2, 2:14 pm, Booter wrote: > Hello all, > > I am new to python ans was wondering if there was a way to get the mac > address from the local NIC? > > Thanks for your help. > > Gerad for windows parse p.stdout.read(): import subprocess p = subprocess.Popen('ipconfig', shell = True, stdout =

Getting Local MAC Address

2010-04-02 Thread Booter
Hello all, I am new to python ans was wondering if there was a way to get the mac address from the local NIC? Thanks for your help. Gerad -- http://mail.python.org/mailman/listinfo/python-list