문제

I have a simple directory containing just 2 links to other directories. os.walk does not walk into them, it reports 2 files and 0 directories. I note the docs refer to "symlink" which I suspect is a Unix term not MS but Im not sure. Or is there something else im missing?

[Python 2.7 on Vista Pro]

도움이 되었습니까?

해결책

It does not work on Windows (at least in Windows 7).

followlink depends on os.islink, os.isdir. But both returns False for Link directory in windows (in Python 2.7).

BTW, in Python 3.2+, os.islink return True for symlinks. But os.isdir still return False. os.walk does not work neither.

See os.path.islink on windows with python.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top