Hynek Schlawack <h...@ox.cx> added the comment: I think your problem is a different one: os.listdir() doesn't return full paths and os.path.isfile()/isdir() return False if the supplied path doesn't exist.
For example if you have this directory structure: foo/ foo/bar/ foo/bar/baz Calling os.listdir('foo') will return ["bar"]. Calling os.isdir('bar') will return False because it can't find the file. Have a look at os.walk() which was written with your use case in mind. ---------- nosy: +hynek resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14985> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com