Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1a.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.029 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'amounts': 0.07; 'interpreter.': 0.07; "'.'": 0.09; 'raises': 0.09; '23,': 0.16; 'sane': 0.16; 'sys.path': 0.16; 'wrote:': 0.18; 'do.': 0.18; 'file,': 0.19; 'feb': 0.22; 'directory.': 0.24; 'mon,': 0.24; 'question': 0.24; 'header:In-Reply-To:1': 0.27; 'message- id:@mail.gmail.com': 0.30; 'file': 0.32; 'received:google.com': 0.35; 'executing': 0.36; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; "you're": 0.61; 'containing': 0.69; '/only/': 0.84; '2015': 0.84; 'ethan': 0.84; 'furman': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=x4LgOZ33S4MDfxZP+1ZrC1Kvhr/NdeSyScE/AB3JW3s=; b=vLk6tEUD8JTYbPPHYdzV7VXjtN9d6ryRaa+tH+hFsk1RlDwBossaj2jTs6CjEruymC 3oSWdIv8xWMOXUwfqQgjE1trIQUKJvlqTepxRAI5o7TWsUrP3wGVfk6c8mzD+sYJNuKL LPmpi/OpdA2p8vLw5ESRUU9lRkx5n3RquaoymDDbntzmusiI2FzCpERaDQSEjKLraTs7 /CnU4NTU5fSKjLdUKFlpSx5zdiOlE2gRgvc3vpv8roDXeb8DzCv9ZqsNt6GlsSmAc4vp pfQKs9dXAW4Zf+OptKfnNPFmpgOcCSBFYRJslgfA7XRUO1HsObx0IlOSRuU5Z35gQb/h w5nA== X-Received: by 10.66.251.2 with SMTP id zg2mr23069752pac.89.1424730586190; Mon, 23 Feb 2015 14:29:46 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <54EBA649.8030401@stoneleaf.us> References: <54EBA649.8030401@stoneleaf.us> From: Ian Kelly Date: Mon, 23 Feb 2015 15:29:05 -0700 Subject: Re: new.py and having '.' in PYTHONPATH To: Python Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 11 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1424730589 news.xs4all.nl 2943 [2001:888:2000:d::a6]:37528 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:86274 On Mon, Feb 23, 2015 at 3:14 PM, Ethan Furman wrote: > On 02/23/2015 01:00 PM, Tobiah wrote: > >> Anyway, it raises the question as to whether having '.' in the >> PYTHONPATH is at all a sane thing to do. > > The current directory is added to sys.path /only/ for the interactive interpreter. When executing a file, the directory containing the file is added to sys.path instead, which amounts to the same thing if the file that you're executing is in your current working directory.