Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #63840

Re: How to get Mac address of ethernet port?

References <6a5ceb3f-021d-4acc-b618-ce53530fa2dd@googlegroups.com> <BLU0-SMTP4386E5DFE51C2E3BD49827591B20@phx.gbl> <52D1729B.7050906@gmail.com> <8B27ECD8-C6DB-414F-A76D-49B5E3DDD7E5@mac.com>
Date 2014-01-14 03:47 +1100
Subject Re: How to get Mac address of ethernet port?
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.5414.1389631648.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Tue, Jan 14, 2014 at 2:42 AM, William Ray Wing <wrw@mac.com> wrote:
> The one I've used is to spawn a subprocess and run the "ifconfig" command with no arguments (which doesn't require any special privileges).

Very small caveat: On some systems, running ifconfig doesn't require
privileges, but it's not in the unprivileged user's default path (it's
in root's path though). I've seen this on Debian Linux, for instance.
So you may need to explicitly call /sbin/ifconfig or whereever it's
stored.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

How to get Mac address of ethernet port? Sam <lightaiyee@gmail.com> - 2014-01-11 06:26 -0800
  Re: How to get Mac address of ethernet port? Andriy Kornatskyy <andriy.kornatskyy@live.com> - 2014-01-11 16:35 +0200
    Re: How to get Mac address of ethernet port? "James Harris" <james.harris.1@gmail.com> - 2014-01-11 15:54 +0000
      Re: How to get Mac address of ethernet port? Roy Smith <roy@panix.com> - 2014-01-11 11:29 -0500
        Re: How to get Mac address of ethernet port? Chris Angelico <rosuav@gmail.com> - 2014-01-12 08:40 +1100
          Re: How to get Mac address of ethernet port? Roy Smith <roy@panix.com> - 2014-01-11 16:55 -0500
            Re: How to get Mac address of ethernet port? Chris Angelico <rosuav@gmail.com> - 2014-01-12 09:08 +1100
            Re: How to get Mac address of ethernet port? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-01-12 11:22 -0500
  Re: How to get Mac address of ethernet port? Chris Angelico <rosuav@gmail.com> - 2014-01-12 01:38 +1100
  Re: How to get Mac address of ethernet port? Chris Angelico <rosuav@gmail.com> - 2014-01-12 01:52 +1100
  Re: How to get Mac address of ethernet port? Skip Montanaro <skip@pobox.com> - 2014-01-11 09:03 -0600
  Re: How to get Mac address of ethernet port? Michael Torrie <torriem@gmail.com> - 2014-01-11 09:34 -0700
    Re: How to get Mac address of ethernet port? Sam <lightaiyee@gmail.com> - 2014-01-11 17:25 -0800
  Re: How to get Mac address of ethernet port? William Ray Wing <wrw@mac.com> - 2014-01-13 10:42 -0500
  Re: How to get Mac address of ethernet port? Chris Angelico <rosuav@gmail.com> - 2014-01-14 03:47 +1100

csiph-web