In <[EMAIL PROTECTED]>, Gigs_ wrote:
> import fnmatch, os
>
> def find(pattern, startdir=os.curdir):
> matches = []
> os.path.walk(startdir, findvisitor, (matches, pattern))
> matches.sort()
> return matches
>
> def findvisitor((matches, pattern), thisdir, nameshere): #
>
import fnmatch, os
def find(pattern, startdir=os.curdir):
matches = []
os.path.walk(startdir, findvisitor, (matches, pattern))
matches.sort()
return matches
def findvisitor((matches, pattern), thisdir, nameshere): #
for name in nameshere:
if fnmatch.fnmatch(name