def find(pattern
, dir = os
.curdir
):
if name
in (os
.curdir
, os
.pardir
):
fullname
= os
.path
.join(dir, name
)
if fnmatch
.fnmatch(name
, pattern
):
if os
.path
.isdir(fullname
) and not os
.path
.islink(fullname
):
if fnmatch
.fnmatch(name
, p
):
if _debug
: print "skip", `fullname`
if _debug
: print "descend into", `fullname`
list = list + find(pattern
, fullname
)