Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!border1.nntp.ams2.giganews.com!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed5.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.018 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'subject:Python': 0.05; 'problem?': 0.07; 'variable,': 0.07; 'python': 0.09; 'does,': 0.09; 'pep': 0.09; 'stating': 0.09; 'subject:Why': 0.09; 'rationale': 0.16; 'wrote:': 0.17; 'directory.': 0.17; 'example': 0.23; "i've": 0.23; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; 'thanks!': 0.26; 'is?': 0.27; 'actual': 0.28; 'changed.': 0.29; 'code': 0.31; 'anyone': 0.33; 'to:addr:python- list': 0.33; 'program,': 0.34; 'or,': 0.34; 'subject:?': 0.35; 'there': 0.35; 'does': 0.37; 'why': 0.37; 'far': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'your': 0.60; 'received:208': 0.63; 'show': 0.63; 'demonstrates': 0.84; 'is)': 0.84; 'start-up,': 0.84; 'officially': 0.91; 'subject:remember': 0.91 X_CMAE_Category: 0,0 Undefined,Undefined X-CNFS-Analysis: v=2.0 cv=WtWpwKjv c=1 sm=0 a=qWrprD/fFhD7gr3OB/gepA==:17 a=aFP-xk0SXQ8A:10 a=EHBxjTJzyKQA:10 a=RSPf8KcgRHcA:10 a=8nJEP1OIZ-IA:10 a=MImxtJKzGlkA:10 a=QA7ub1_jAAAA:8 a=jYg_LODwximgZzU-AgUA:9 a=wPNLvfGTeEIA:10 a=qWrprD/fFhD7gr3OB/gepA==:117 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine Authentication-Results: smtp03.embarq.synacor.com smtp.user=defant; auth=pass (LOGIN) Date: Sun, 19 Aug 2012 23:05:10 +0200 From: Laszlo Nagy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Why doesn't Python remember the initial directory? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1345411526 news.xs4all.nl 6972 [2001:888:2000:d::a6]:51764 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:27434 On 2012-08-19 22:42, kj wrote: > > As far as I've been able to determine, Python does not remember > (immutably, that is) the working directory at the program's start-up, > or, if it does, it does not officially expose this information. > > Does anyone know why this is? Is there a PEP stating the rationale > for it? > > Thanks! When you start the program, you have a current directory. When you change it, then it is changed. How do you want Python to remember a directory? For example, you can put it into a variable, and use it later. Can you please show us some example code that demonstrates your actual problem?