os.path.walk

Tony Meyer t-meyer at ihug.co.nz
Wed Apr 13 19:34:18 EDT 2005


> I think if you try this you will find that it doesn't work because 
> os.path.walk will try to call the *result* of processDirectory(a,b,c) 
> for each directory in the path.

Opps.  I missed the "path", so gave an answer for os.walk.  Apologies.

The actual answer, then, I guess is that the OP can do this:

os.path.walk(name, processDirectory, (a,b,c))

And define processDirectory something like:

def processDirectory(args, dirname, fnames):
   a,b,c = args
   ...

=Tony.Meyer




More information about the Python-list mailing list