def checkfilename(name):
	"check if file name matches with the given pattern"

	m = re.search('(\D*).xml$', name)
	#print 'checking filename', name
	if m is None:
		return False
	else:
		#print 'returning true for filename', name
		return True
check if file name matches with the given pattern
recipes/Python/435904_sedawk__Pythscript_rename_subdirectories/recipe-435904.py