[issue17545] os.listdir and os.path.join inconsistent on empty path

2013-03-25 Thread Bernard Lang
New submission from Bernard Lang: The empty path '' is considered as an acceptable path in os.path.join, and works as a neutral prefix: print os.path.join('','aaa') === aaa which seems rather natural. But it raises an exception when used as a parameter to os.listdir. Logically, it should

[issue17545] os.listdir and os.path.join inconsistent on empty path

2013-03-26 Thread Bernard Lang
Bernard Lang added the comment: Reply to R.David.Murray See also issue 6095. You are right. I goofed, this is the issue I meant to point to. $ ls '' ls: cannot access : No such file or directory So, the behavior is consistent with the shell. This is a fair remark. But still, giving

[issue17545] os.listdir and os.path.join inconsistent on empty path

2013-04-25 Thread Bernard Lang
Bernard Lang added the comment: Thank you, David. BTW, I sent a message on april 20 to d...@python.org about a bug in the documentation regarding os.readlink(path) on page http://docs.python.org/2/library/os.html and proposing an alternative text. I got no reply. This was not long ago