Re: [Tutor] return values from function

2005-07-30 Thread Alan G
> I have the following code to traverse a directory structure from a > given path: I'm not sure what you are using the browse function for. Normally with path.walk you would use browse)() to modify the namelist argument value and thus modify the path walked by path.walk(). You appear to be trying

Re: [Tutor] return values from function

2005-07-30 Thread Kent Johnson
Jorge Louis De Castro wrote: > Hi all, > > I have the following code to traverse a directory structure from a given > path: > > import os, fnmatch, re > folders = [] > r = re.compile(r'file_filter') # msn_username is passed by the user > > def browse(junk, dirpath, namelist): > for name in na

[Tutor] return values from function

2005-07-30 Thread Jorge Louis De Castro
Hi all, I have the following code to traverse a directory structure from a given path: import os, fnmatch, re folders = [] r = re.compile(r'file_filter') # msn_username is passed by the user def browse(junk, dirpath, namelist): for name in namelist: if r.search(name): folders.append