All pastes #2045338 Raw Edit

Stuff

public python v1 · immutable
#2045338 ·published 2011-04-12 03:41 UTC
rendered paste body
def fileGlob(wpath , gst='*' , recuBool=1):	"""	recursivly (optional) glob a path for objects that	match the string 'gst' and return that list	1 == Recursive	"""	if recuBool == 1:		fList  = glob(join(wpath,gst))		aTmp   = glob(join(wpath,'*'))		aList = []		# clean aList of matches		for a in aTmp:			if fList.count(a) == 0:				if isdir(a) == 1:					aList.append(a)		for a in aList:			aTmp  = glob(join(a,gst))			for i in aTmp:				fList.append(i)	else:		fList  = glob(join(wpath,gst))	return fList