Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.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.072 X-Spam-Evidence: '*H*': 0.87; '*S*': 0.01; 'subject:Function': 0.09; 'subject:script': 0.09; 'python': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'files.': 0.16; 'wrote:': 0.18; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'gary': 0.31; 'file': 0.32; 'running': 0.33; 'subject:the': 0.34; 'common': 0.35; 'received:google.com': 0.35; 'subject:?': 0.36; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; "you're": 0.61; 'kind': 0.63; 'huh?': 0.84; '2013': 0.98 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=fgd6ucb2WRL8IgEm3J34ZGmwuYC6JVrxtnhT1D4rKq8=; b=r4g5r7UnPMO0uqsxB2U6ezQIaYTJ/MtO3imJCVrJHQdBMr3EptM241vABVowgATj44 EFtm5PY75TW8u2G21Ux8Z+aOrwDnDA+UH5KcsDw9j+Txvg8uBZRWGphZTu0o7keGu3G7 ZtLC3lPZX3moV1DOanzmxvgdgB5heAP7Nfgv/b7qeJGHwlJmCBZHbYl+UAsqSdhiSzSs 5fWufcYKxNh6YsGn488wtTD2IUBZQ1+j2ZmPENR1xpLt7+qKlVZP0sRs4HRDlyyJe2Ts kwmv2anCsD/CRvmfW3afScGwi6LbzYCcZSmdOzaUZmKb44v4z9xrMAdfQkJdLfE5Ic1g ARvQ== MIME-Version: 1.0 X-Received: by 10.68.254.105 with SMTP id ah9mr9356078pbd.87.1382842914053; Sat, 26 Oct 2013 20:01:54 -0700 (PDT) In-Reply-To: <526C7FEF.7020206@islandtraining.com> References: <00704f33-7e7f-4ccf-b28b-69776d2e237d@googlegroups.com> <526C7FEF.7020206@islandtraining.com> Date: Sun, 27 Oct 2013 14:01:54 +1100 Subject: Re: Function for the path of the script? 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.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: 9 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1382842917 news.xs4all.nl 15877 [2001:888:2000:d::a6]:41202 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:57708 On Sun, Oct 27, 2013 at 1:52 PM, Gary Herron wrote: > Huh? In what kind of a workflow are you running a python file without > knowing *what* file you are runnung? It's very common to want to know what directory you're in - it's a good way to find data files. ChrisA