Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #45413
| Date | 2013-05-16 04:18 -0400 |
|---|---|
| From | Dave Angel <davea@davea.name> |
| Subject | Re: executing python scripts that are symlinked |
| References | <95bc1155-0a83-4ab1-8b76-68a819b2e29a@en2g2000vbb.googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1741.1368692298.3114.python-list@python.org> (permalink) |
On 05/16/2013 03:48 AM, 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. > > Someone said on the net that python doesn't know whether a file is > real or a symlink, but I think that somehow, python is able to find > out where the real file is and treat that as its base of operations. > You'd really better specify your environment - exact OS and Python version. symlink and cwd usually imply a Unix-type system, but cmd is a Windows thing. Then give examples of what your cwd is, what string you're typing at the shell prompt, and what's happening. For example windows is good at changing cwd long before the executable gets control, in some situations. -- DaveA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
executing python scripts that are symlinked Charles Smith <cts.private.yahoo@gmail.com> - 2013-05-16 00:48 -0700
Re: executing python scripts that are symlinked Andrew Berg <bahamutzero8825@gmail.com> - 2013-05-16 03:12 -0500
Re: executing python scripts that are symlinked Dave Angel <davea@davea.name> - 2013-05-16 04:18 -0400
Re: executing python scripts that are symlinked Charles Smith <cts.private.yahoo@gmail.com> - 2013-05-16 01:29 -0700
Re: executing python scripts that are symlinked Dave Angel <davea@davea.name> - 2013-05-16 10:45 -0400
Re: executing python scripts that are symlinked Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-05-16 09:04 +0000
Re: executing python scripts that are symlinked Charles Smith <cts.private.yahoo@gmail.com> - 2013-05-16 02:23 -0700
csiph-web