Message32647
This code:
import os
import os.path
TARGET='C:/code/python/foo'
base = TARGET
for x in range(200):
subdirs = os.listdir(base)
base = os.path.join(base, subdirs[0])
print base
Produces a TypeError (buffer overflow) when run on a to deeply nested directory for windows to handle:
.. more output here..
C:code/python/foo\foo bar.png\foo bar.png\foo bar.png\foo bar.png\foo bar.png\foo bar.png\foo bar.png\foo bar.png\foo bar.png\foo bar.png\foo bar.png\foo bar.png\foo bar.p
ng\foo bar.png\foo bar.png\foo bar.png\foo bar.png\foo bar.png\foo bar.png\foo bar.png
Traceback (most recent call last):
File "killdir.py", line 6, in <module>
subdirs = os.listdir(base)
TypeError: listdir() argument 1 must be (buffer overflow), not str
|
|
Date |
User |
Action |
Args |
2007-08-23 14:59:14 | admin | link | issue1776160 messages |
2007-08-23 14:59:14 | admin | create | |
|