Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python': 0.09; "'.'": 0.09; 'os.getcwd()': 0.09; 'path,': 0.09; 'subject:Does': 0.09; 'subject:same': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr :python-list': 0.10; 'os.curdir': 0.16; 'subject:effect': 0.16; 'later': 0.16; 'wrote:': 0.17; 'directory.': 0.17; '>>>': 0.18; 'import': 0.21; 'cc:2**0': 0.23; 'absolute': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; 'subject: ?': 0.30; 'expect': 0.31; 'directory,': 0.33; "can't": 0.34; 'received:google.com': 0.34; 'pm,': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'does': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'land': 0.62; 'thomas': 0.62; 'more': 0.63; 'subject:have': 0.79 Newsgroups: comp.lang.python Date: Wed, 26 Sep 2012 23:26:30 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=182.242.153.108; posting-account=Z1-aQQoAAADvnuKxr9sysEiuPIcBNfjX References: <12b64802-d598-441b-b3cd-87ec17bba514@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 182.242.153.108 MIME-Version: 1.0 Subject: Re: Does os.getcwd() and os.curdir have the same effect ? From: iMath To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org 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: , Message-ID: Lines: 10 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1348727202 news.xs4all.nl 6948 [2001:888:2000:d::a6]:41969 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:30278 On Sunday, September 9, 2012 9:39:28 PM UTC+8, Thomas Jollans wrote: > On 09/09/2012 03:22 PM, iMath wrote: > Does os.getcwd() and os.curdir hav= e the same effect ? > Python 3.2.3 (default, May 3 2012, 15:51:42) [GCC 4.6= .3] on linux2 Type "help", "copyright", "credits" or "license" for more inf= ormation. >>> import os >>> os.getcwd() '/home/tjol' >>> os.curdir '.' >>> = No. Both refer to the current directory, but os.curdir is not an absolute p= ath, so you can't chdir() to it later and expect to land it the original di= rectory. get it ,thanks