Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!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.053 X-Spam-Evidence: '*H*': 0.89; '*S*': 0.00; 'am,': 0.12; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:import': 0.16; 'subject:package': 0.16; 'wrote:': 0.16; 'header:In-Reply-To:1': 0.22; 'aug': 0.24; 'message- id:@mail.gmail.com': 0.29; 'subject:same': 0.30; 'sun,': 0.30; 'to:addr:python-list': 0.33; 'instead': 0.33; '(not': 0.38; 'received:google.com': 0.38; 'move': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.39; 'subject:with': 0.39; 'to:addr:python.org': 0.39; 'or,': 0.40; 'subject:from': 0.40; 'subject:name': 0.67 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=wYhQMPTQHQZCdIr46mD+JXiGWM+BJ8/qsc63EY/5l+E=; b=BrQb0SdrNDoGj/CvxtYZLj3yXDC44HouwW3bsRJLfpGLddxa8wC9dcD5kUx5wvobje JYNgS5yrCJYKftWaqyA0GL9yOKUOfumOfuvXl/nIxILKIBG5JjZYBHx35FsmB7d5qAhZ Cl+yOPf9zFjettIFZDiqbnh1YM2jckqFbzyhA= MIME-Version: 1.0 In-Reply-To: References: Date: Sun, 14 Aug 2011 01:07:40 +0100 Subject: Re: Relative import from script with same name as package 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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1313280462 news.xs4all.nl 23944 [2001:888:2000:d::a6]:45007 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:11358 On Sun, Aug 14, 2011 at 12:55 AM, OKB (not okblacke) wrote: > sys.path = sys.path[1:] + [''] > > (That is, move the current directory to the end of the search path > instead of the beginning.) > Or, equivalently: sys.path.append(sys.path.pop(0)) ChrisA