( pathlist )
return filelist
Get a recursive list of of all files under all path items in the list
Get a recursive list of of all files under all path items in the list
Get a recursive list of of all files under all path items in the list
def get_recursive_filelist( pathlist ):
	"""
	Get a recursive list of of all files under all path items in the list
	"""
	filename_encoding = sys.getfilesystemencoding()	
	filelist = []
	for p in pathlist:
		# if path is a folder, walk it recursivly, and all files underneath
		if type(p) == str:
			#make sure string is unicode
			p = p.decode(filename_encoding) #, 'replace')
		elif type(p) != unicode:
			#it's probably a QString
			p = unicode(p)
		
		if os.path.isdir( p ):
			for root,dirs,files in os.walk( p ):
				for f in files:
					if type(f) == str:
						#make sure string is unicode
						f = f.decode(filename_encoding, 'replace')
					elif type(f) != unicode:
						#it's probably a QString
						f = unicode(f)
					filelist.append(os.path.join(root,f))
		else:
			filelist.append(p)
	
	return filelist
def get_recursive_filelist ( pathlist ) : filename_encoding = sys . getfilesystemencoding ( ) filelist = [ ] for p in pathlist : # if path is a folder, walk it recursivly, and all files underneath if type ( p ) == str : #make sure string is unicode p = p . decode ( filename_encoding ) #, 'replace') elif type ( p ) != unicode : #it's probably a QString p = unicode ( p ) if os . path . isdir ( p ) : for root , dirs , files in os . walk ( p ) : for f in files : if type ( f ) == str : #make sure string is unicode f = f . decode ( filename_encoding , 'replace' ) elif type ( f ) != unicode : #it's probably a QString f = unicode ( f ) filelist . append ( os . path . join ( root , f ) ) else : filelist . append ( p ) return filelist