[issue1387483] sys.path[0] when executed thru a symbolic link

Charles-François Natali report at bugs.python.org
Thu Apr 4 17:49:59 CEST 2013


Charles-François Natali added the comment:

> You would have expected "/home/kristjan/pydir" since this is the
> apparent directory of the file.

That's questionable.
You usually have the libraries along with the binary: that's for example the case when you do a CPython checkout.

Changing this to not resolve the symlink would break some use cases. An alternative would be to add both the original and target directory if they differ, hoping that there's no conflict in the modules.

----------
nosy: +neologix

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1387483>
_______________________________________


More information about the Python-bugs-list mailing list