Message162146
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. |
|
Date |
User |
Action |
Args |
2012-06-02 16:01:08 | hynek | set | recipients:
+ hynek, ronaldoussoren, javahaxxor |
2012-06-02 16:01:08 | hynek | set | messageid: <1338652868.6.0.918352108319.issue14985@psf.upfronthosting.co.za> |
2012-06-02 16:01:08 | hynek | link | issue14985 messages |
2012-06-02 16:01:07 | hynek | create | |
|