Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'python,': 0.01; 'subject:Python': 0.04; 'though.': 0.07; 'python': 0.07; 'subject:library': 0.09; 'subject:query': 0.09; 'files.': 0.10; 'output': 0.12; 'am,': 0.14; 'wrote:': 0.14; 'subject:MAC': 0.16; 'subject:addresses': 0.16; 'temporary': 0.19; 'tue,': 0.20; 'header:In-Reply-To:1': 0.22; 'calling': 0.25; 'wrote': 0.25; 'script': 0.26; "i'll": 0.26; 'chris': 0.27; 'message- id:@mail.gmail.com': 0.28; 'installed': 0.29; 'problem': 0.29; 'subject:?': 0.29; 'solved': 0.31; 'to:addr:python-list': 0.32; 'thank': 0.32; "i've": 0.33; 'generally': 0.33; 'using': 0.34; 'file': 0.35; 'follows:': 0.35; 'addresses': 0.36; 'rather': 0.36; 'processing': 0.37; 'received:209.85': 0.37; 'subject:with': 0.37; 'apr': 0.38; 'subject:Can': 0.38; 'received:google.com': 0.38; 'but': 0.38; 'to:addr:python.org': 0.39; 'received:209': 0.39; "it's": 0.40; 'header:Received:5': 0.40; 'exact': 0.60; 'results': 0.61; 'further': 0.62; '2011': 0.62; 'records': 0.66; 'subject:you': 0.78; 'received:209.85.210.174': 0.84; 'received :mail-iy0-f174.google.com': 0.84; 'subject:collect': 0.84; 'filtered': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=jnXakcdczeLmCWLJxMh8YVERXut0Nl0J/ctFXYeNMyU=; b=jj4qoeZ8cOp/dKlgDOVKBflxSGAI2aT3gLh4pBVnex12tgBc2didOkyVprU5ec4PlC 4uyPX+w4stOAAqOr4c0nyFZAkdNhjz2694zYPX8b+etb2ipf847uYjhekTdyog2/yT/+ 2BJEL2/wlqWTd47OvKYUiZMvJXoqtLWsCVJ+E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=HLCYAtillp8QDm+NTPbc3uujxvdnciNUBJRpFdAnJoALdNPLcXyMNWPAOLu5Czc915 tZ1GX+3/uvm3xlgwDb+J681lw4zaxLkj2xsbi4P3AC+xVQRBCfDOrHaFDaEoEN3SYlhl 1ADaZk7a9xAd63oJZ/yySzn4SRRqJuENwntBI= MIME-Version: 1.0 In-Reply-To: References: Date: Tue, 19 Apr 2011 05:13:28 +1000 Subject: Re: Can you advice a Python library to query a lan subnet with SNMP and collect MAC addresses of nodes? From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1303154011 news.xs4all.nl 81475 [::ffff:82.94.164.166]:43625 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:3496 On Tue, Apr 19, 2011 at 1:23 AM, Aldo Ceccarelli wrote: > Hello and thank you All! > I've solved my problem as follows: > 1. installed nmap > 2. wrote a python script calling nmap nmap -sP via os.system and > redirecting output to a file > 3. read results file and made a further processing to get exact > filtered records with MAC addresses I needed I don't know if it's significant, but if I want to process a command's output using Python, I'll generally use: nmap -sP | /path/to/script.py rather than os.system() and temporary files. YMMV though. Chris Angelico