Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.036 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'imports': 0.07; 'subject:changing': 0.07; 'extension.': 0.09; 'namespace': 0.09; 'declaration': 0.16; 'strangely': 0.16; 'cc:addr:python-list': 0.16; 'thanks,': 0.19; 'cc:no real name:2**0': 0.21; "doesn't": 0.22; 'header:In-Reply-To:1': 0.22; 'cc:2**0': 0.26; 'example': 0.29; 'problem': 0.29; 'cc:addr:python.org': 0.29; 'message- id:@gmail.com': 0.31; 'changing': 0.32; 'header:User-Agent:1': 0.33; 'something': 0.35; 'received:209.85.214': 0.36; 'issue': 0.37; 'received:10.0.0': 0.37; 'but': 0.37; 'received:google.com': 0.37; 'received:209.85': 0.38; 'think': 0.38; 'suggestions': 0.39; 'received:209': 0.39; 'more': 0.61; 'care': 0.71; 'andrea': 0.84; 'directories,': 0.84; '(every': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=8AwIgJ3yPQms4MhnVp06So5YG8q14gnqGXBVt3VoD1Y=; b=ZwjqEftXqueZRvk+a13q3RVKDLbn36U85/ZmiVBCCraLwGrPLYPNZd4Igb3Pa8E6vr tRmMdPnINZa5KJnFAuF6pGWisj3sikNZf9FPb6TlXbO0twNmWdPNd5FhnTkqvgjZmZBp OBMJ8nqwrkAyj5IJ79NZ0Uu9w4UJnsWwTM+jw= Date: Fri, 10 Feb 2012 13:08:28 +0000 From: Andrea Crotti User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111224 Thunderbird/9.0.1 MIME-Version: 1.0 To: Rick Johnson Subject: Re: changing sys.path References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: python-list@python.org 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: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1328879313 news.xs4all.nl 6917 [2001:888:2000:d::a6]:47686 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:20162 I think I finally located the issue with the sys.path extension. The problem is that I have many namespace directories, for example lib: - sub1 - sub2 lib: - sub3 - sub4 But to have everything working I had lib.sub3 in easy-install.pth. Now if I try to add something else to the path it doesn't take care of the namespace declaration (every __init__.py in the packages contains: __import__('pkg_resources').declare_namespace(__name__)) and just doesn't find the other submodules.. If I try to add manually lib.sub1, lib.sub2 changing the sys.path the imports will only work for the first one. Strangely if I just create a dev_main.pth in site-packages containing the same paths, everything works perfectly. Any suggestions now that the problem is more clear? Thanks, Andrea