title: Python mac adress matching and processing
body: <p>python version 2.7.3</p>
  
  <p>here is the "code" so far:</p>
  
  <pre><code>import subprocess
  
  p = subprocess.Popen(["pppoe-discovery", "-I", "eth0"], stdout=subprocess.PIPE)
  output, err = p.communicate()
  
  print output
  </code></pre>
  
  <p>This will give a string containing all the pppoe servers discovered</p>
  
  <p>My problem is extracting all mac addresses and compare each one with a predefined list or string.</p>
  
  <p>Even if I could find and print all of them , it is still unclear for me as a beginner to find a solution to compare each to see if it's in the list.
  After that I'll just cook up some if "condition" and send a email with the non-matching mac-address.</p>
  
  <p>output:</p>
  
  <p>Access-Concentrator: xxxx
         Service-Name: xxxx</p>
  
  <h2>Got a cookie: de 58 08 d0 66 c8 58 15 a0 66 9b b1 02 3f 7c 95 1f 42 00 00</h2>
  
  <p>AC-Ethernet-Address: 00:22:33:6b:4b:ee</p>
  
  <p>this is just one of the servers , the list goes on.</p>