Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +brian.curtin, tim.golden
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13412
___
___
New submission from Alex Regueiro alex...@gmail.com:
Python 2.7 has no knowledge of directory symlinks on Windows 7. Listing a
directory symlink does not work, nor does accessing a file within one. This is
quite a notable missing feature on Windows 7, where symlinks are becoming
increasingly
Changes by Eric V. Smith e...@trueblade.com:
--
nosy: +eric.smith, jason.coombs
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13412
___
___
Changes by Florent Xicluna florent.xicl...@gmail.com:
--
components: +Windows
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13412
___
Jason R. Coombs jar...@jaraco.com added the comment:
Python 2.7 is not aware of symlinks and treats them like their targets, so it
should be able to list a symlink directory or access a file within one. For
example:
PS C:\Users\jaraco cmd /c dir
Volume in drive C is system
Volume Serial
Brian Curtin br...@python.org added the comment:
I think we could still make os.listdir work properly. I'll look into a patch
for this.
One problem here is the testability, since we'd need to rely on the mklink
CLI app to create the symlinks, which requires that the calling application
Alex Regueiro alex...@gmail.com added the comment:
What are you running? This is not what I get on Win7 x64, and I have had
several other users in ##python on FreeNode confirm this inability. As far as
Python is concerned, these dir sym links do not even exist.
--
Jason R. Coombs jar...@jaraco.com added the comment:
I should mention that there is third-party symlink support in jaraco.windows
(http://pypi.python.org/pypi/jaraco.windows). Just easy_install it, and then
use jaraco.windows.filesystem.symlink.
If there are features you need for symlink
Alex Regueiro alex...@gmail.com added the comment:
Thanks Bryan, that would be great.
The elevated privs problem could potentially be avoided by creating symlinks
using the Win32 API directly. As long as the appropiate group policy is set,
one does not require admin privs to create symlinks.
Jason R. Coombs jar...@jaraco.com added the comment:
Brian, I'm still not sure I see the problem with os.listdir. It includes
symlinks when listing a dir and traverses them naturally when referencing them
as part of a path to listdir. Under what conditions does it fail?
--
Alex Regueiro alex...@gmail.com added the comment:
Well, at the very least it's a system-dependent issue, since I've tried out
listdir and also file access on my system and some other Windows users'.
--
___
Python tracker rep...@bugs.python.org
Jason R. Coombs jar...@jaraco.com added the comment:
Some variables could be a missing privilege or role, or perhaps a UAC
restriction. What error do you get when you attempt to invoke os.listdir on a
symlink directory?
--
___
Python tracker
Alex Regueiro alex...@gmail.com added the comment:
No error whatsoever. Python just thinks it doesn't exist unfortunately. Same
report from other users...
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13412
Brian Curtin br...@python.org added the comment:
symlinks when listing a dir and traverses them naturally when referencing
them as part of a path to listdir. Under what conditions does it fail?
--
___
Python tracker rep...@bugs.python.org
Alex Regueiro alex...@gmail.com added the comment:
When listing the parent dir in which a dir symlink resides, the dir symlink
doesn't show up. That's the one I noticed most.
--
___
Python tracker rep...@bugs.python.org
Jason R. Coombs jar...@jaraco.com added the comment:
On Windows Vista and Windows 7, there should be a symlink directory:
C:\Documents and Settings - .\Users
Perhaps a good test would be:
assert 'Documents and Settings' in os.listdir('C:\\')
As long as there aren't any i18n issues, and the
16 matches
Mail list logo