Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eweka.nl!lightspeed.eweka.nl!194.109.133.86.MISMATCH!newsfeed.xs4all.nl!newsfeed3.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.027 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'cpython': 0.05; 'say,': 0.05; 'python': 0.11; 'windows': 0.15; 'charles': 0.16; 'cmd': 0.16; 'cwd': 0.16; 'symlink': 0.16; 'targets': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'fine': 0.24; 'script': 0.25; 'header:In-Reply-To:1': 0.27; "doesn't": 0.30; 'absolute': 0.30; 'is?': 0.30; 'that.': 0.31; 'are.': 0.31; 'subject:that': 0.31; 'file': 0.32; 'guess': 0.33; 'actual': 0.34; 'created': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'should': 0.36; 'message- id:@gmail.com': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'line,': 0.68; 'smith': 0.68; '3.3.1': 0.84; '9.1': 0.84; 'freebsd': 0.84; 'absolutely': 0.87 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=dNa0+xhXacIZbPPhiIjjf4fhsgdOfVgVEVNLtp/ydr4=; b=vUfycJi3RN0o5ufnXfrLVCmF/ZA+OBpJybw2HgZ6d2+II/hI65AJE4a5b/BNtggi/j Znsnf6LLWSRhWRjfPOZliKVf4qwE5HodgGe60ZN91Dv5u4U9v9V+Cva/ZyEeSAvAlXWq kWnflhVvHD9ZQJyGQT3nByEoguEekInxFhN0pVmkW1VDd7QQ8YtOrGZMbGJTA+zHeGNu B1OoDHowH1br/1/KzAaJ0/01kyvZa2n9Php9pzhxbq9m219i4yeKJn59QHO5iT/ilvsu zSIdyxZcW3/rsXreNkIA1R7o6DlVF3MtaRrbpxwywJ8VUdDZo+NYD/CHPZ5+R9dxVm4l +tEQ== X-Received: by 10.50.107.106 with SMTP id hb10mr8392423igb.25.1368691973670; Thu, 16 May 2013 01:12:53 -0700 (PDT) Date: Thu, 16 May 2013 03:12:50 -0500 From: Andrew Berg User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: "comp.lang.python" Subject: Re: executing python scripts that are symlinked References: <95bc1155-0a83-4ab1-8b76-68a819b2e29a@en2g2000vbb.googlegroups.com> In-Reply-To: <95bc1155-0a83-4ab1-8b76-68a819b2e29a@en2g2000vbb.googlegroups.com> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1368691981 news.xs4all.nl 15968 [2001:888:2000:d::a6]:60255 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:45412 On 2013.05.16 02:48, Charles Smith wrote: > Hi. > > How can I say, from the cmd line, that python should take my CWD as my > CWD, and not the directory where the script actually is? > > > I have a python script that works fine when it sits in directory WC, > but if I move it out of WC to H and put a symlink from H/script to WC, > it doesn't find the packages that are in WC. Also, if I use the > absolute path to H, it won't find them, but I guess I can understand > that. Symlinks can find their targets, but targets have absolutely no way of knowing where symlinks to them are. It's one-way. It would work if the actual file were in WC and you created a symlink inside H. -- CPython 3.3.1 | Windows NT 6.2.9200 / FreeBSD 9.1