executing python scripts that are symlinked

Charles Smith cts.private.yahoo at gmail.com
Thu May 16 03:48:45 EDT 2013


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.

Charles.

----------------------------------------------------------
http://www.creative-telcom-solutions.de



More information about the Python-list mailing list