[New-bugs-announce] [issue14547] Python symlink to script behaves unexpectedly

Johannes Buchner report at bugs.python.org
Wed Apr 11 16:42:49 CEST 2012


New submission from Johannes Buchner <buchner.johannes at gmx.at>:

If I have a script 
foo/bar.py
  import baz

and create a symlink to it, called barhere.py
ln -s foo/bar.py barhere.py

when I run it, it behaves unexpectedly, specifically it behaves differently than if I had copied it here. It prefers to import baz from foo/baz, not from the current folder.

Apparently Python (2.7.2-r3) handles symlinks differently than just looking at the content (everything is a file philosophy in UNIX).

----------
messages: 158039
nosy: j13r
priority: normal
severity: normal
status: open
title: Python symlink to script behaves unexpectedly

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


More information about the New-bugs-announce mailing list