[issue9575] os.listdir() crashes on some long and deep paths in Windows 7

2010-08-13 Thread Heejin
Heejin ahee...@gmail.com added the comment: Thank you for your answer. I cannot provide any error messages or stack traces because it really *crashed*. python.exe suddenly stops working and a windows pops up saying something like python.exe had a problem and needed to be closed I cannot say

[issue9575] os.listdir() crashes on some long and deep paths in Windows 7

2010-08-13 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: Thanks for the feedback. I'll close this for now as works for me. Feel free to reopen if you can come up with anything fresh. -- resolution: - works for me stage: - committed/rejected status: open - closed

[issue9575] os.listdir() crashes on some long and deep paths in Windows 7

2010-08-12 Thread Heejin
New submission from Heejin ahee...@gmail.com: As far as I have seen, this bug only appears in Windows 7. I tested with Python 2.5, 2.6, and 2.7 and they all seem to have this bug. I tested with Windows 7 Korean version. I'm not sure if other language versions have the same problem.

[issue9575] os.listdir() crashes on some long and deep paths in Windows 7

2010-08-12 Thread Tim Golden
Changes by Tim Golden m...@timgolden.me.uk: -- assignee: - tim.golden nosy: +tim.golden versions: -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9575 ___

[issue9575] os.listdir() crashes on some long and deep paths in Windows 7

2010-08-12 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: I can't get it crash on a path that short. I can produce an error message if I push it beyond the 254 limit, but you can work around that by applying the filesystem namespace prefix: code import os path = c:\\ + \\.join (130 * ['xx'])

[issue9575] os.listdir() crashes on some long and deep paths in Windows 7

2010-08-12 Thread Heejin
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

[issue9575] os.listdir() crashes on some long and deep paths in Windows 7

2010-08-12 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: See: http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx I tried first with your exact path and it caused no issues on my Win7 box. FWIW you could easily roll your own os.walk (starting by copying the code that's there) if you