[Tutor] walking down directories
Karl Pflästerer
khp at pflaesterer.de
Fri Mar 17 20:19:14 CET 2006
On 17 Mrz 2006, cspears2002 at yahoo.com wrote:
> As you see, the problem is that there is another
> directory under testFiles called testDir, but the
> function doesn't check the directory for files. The
> function needs to find every directory (including
> subdirectories within directories). Any hints?
Your function had to call itself (recursively) for each directory found.
But if your goal is not to learn how to write such a function take a
look at os.walk().
Karl
--
Please do *not* send copies of replies to me.
I read the list
More information about the Tutor
mailing list