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

2013-04-05 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Closign this again. Opened up a new issue: http://bugs.python.org/issue17639 -- status: open -> closed ___ Python tracker ___

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

2013-04-05 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Thanks for your example. > That's AFAICT exacyly the problem reported by the OP on OS-X. You are right, I mis-read the original problem. IMHO, the example you quote is "unexpected". The purpose of symbolic links is to create a "virtual" image of a str

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

2013-04-05 Thread Charles-François Natali
Charles-François Natali added the comment: I've no clue what happened to the issue title (I just replied to the email, and the title changed)... -- title: sys.path -> sys.path[0] when executed thru a symbolic link ___ Python tracker

[issue1387483] sys.path

2013-04-05 Thread Charles-François Natali
Charles-François Natali added the comment: > I am not sure about what use cases could be broken by the above change, do > you have examples? > Normal use cases of symbolic links have to do with linking entire folders, > not individual files, and that behaviour would not be broken by such a >

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

2013-04-04 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: There is no "binary" here contributing to the problem. The particular case is a the hadoop runtime engine which creates a "virtual" folder of your working directory. We have set up a directory of .py files: foo/ a.py b.py c.py The hadoop job is t

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

2013-04-04 Thread Charles-François Natali
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 t

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

2013-04-04 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: The haddoop thingie in question is called cloudera CDH4 -- ___ Python tracker ___ ___ Pyth

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

2013-04-04 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Just came across this when running hadoop jobs it takes your .py script folder, puts each file in its own cache folder, then recreates the script folder populating it with individual symlinks. When run like this, the scripts can no longer import each oth