Heejin <ahee...@gmail.com> added the comment: Thank you for your answer.
Actually I tried that in two Windows7-installed computers and failed in both. But I don't think it is the problem of path lengths; I created other paths that long and that deep but os.listdir() works on them. That's why I wrote the path verbatim on which the function crashes. I couldn't find the exact conditions for it to crash. I haven't heard of that "filesystem namespace prefix" '\\\\?\\' before. I searched it in the manual and googled it but couldn't find an explanation about it. But when I modified the path in my example temp.py it worked! I don't know why though. Could you point out some informative pages about this prefix? Unfortunately, the example temp.py is characterizing only the key reason of the crash. My program uses os.walk() and os.listdir() was actually called within os.walk(), so I cannot prepend the path with '\\\\?\\'. Fortunately I found another workaround for my program, but this still seems a bug.. Thank you. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9575> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com