Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.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.022 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'path.': 0.09; 'subject:modules': 0.09; 'aug': 0.13; 'languages.': 0.15; '24,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'roy': 0.16; 'sys.path': 0.16; 'wrote:': 0.17; 'received:209.85.214.174': 0.21; 'object.': 0.22; 'matching': 0.23; 'header:In-Reply-To:1': 0.25; 'appear': 0.26; 'am,': 0.27; 'core': 0.27; 'message-id:@mail.gmail.com': 0.27; 'dictionary': 0.29; 'finds': 0.29; "i'm": 0.29; 'fri,': 0.30; 'problem': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'received:209.85': 0.35; 'tool': 0.36; 'modules': 0.36; 'level': 0.37; 'why': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'header:Received:5': 0.40; 'your': 0.60; 'high': 0.61; 'times': 0.63; 'love': 0.63; 'smith': 0.71 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=9/GuZADRuK/6Jg++2gckyRkSYwzqM0qVfw3wELd3oB8=; b=VEZCrnnozOghsxvqUtr6JTtroe281LeEv3uAGszTZEbYvm98Pf0xpD8jHS/UzIITnQ 76wRzs1HyHWVVdlSEWQ35SyaLLbTKz9LHIP4Gt8rwQftea6bMOChp6tVYytQUOQkf01R YEO6rUCvs5dTUHQRXCydKvm4v6xgONtEHFEq8Tr4+NzS03z5Ta4QBv41dJsPCgaF9NGb fPUgyo2rgy/efpbTSjfl/WCRxQDvM6wsFnWES6hWVllF5HfQmbjo7wrUdejAFV2fnKgi c8gUuPQG87B93l7w/281uJmsdFHO/0yECGYmNCnIb/G9+M51cZwANIfHtJxkdT8ewl7S P/Ww== MIME-Version: 1.0 In-Reply-To: <377FBB51-D794-4F05-9E51-46A056705E32@panix.com> References: <377FBB51-D794-4F05-9E51-46A056705E32@panix.com> Date: Sat, 25 Aug 2012 04:03:21 +1000 Subject: Re: Looking for duplicate modules 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: 8 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1345831404 news.xs4all.nl 6929 [2001:888:2000:d::a6]:54158 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:27816 On Fri, Aug 24, 2012 at 1:30 AM, Roy Smith wrote: > I'm working on a tool which scans all the directories in sys.path and finds any modules which appear multiple times in the path. It'll also call out any .pyc's it finds without matching py's. > This is why I love high level languages. The core of your problem is solved by a single dictionary object. ChrisA