#NEWLINE# def _files_in( dirname , extension ) : #NEWLINE# #INDENT# 'Returns list of files in given directory,\n    eventually filter by extension.\n    ' #NEWLINE# file_paths = [ os . path . join ( dirname , f ) for f in os . listdir ( dirname ) ] #NEWLINE# filt = ( lambda path : ( os . path . isfile ( path ) and ( os . path . splitext ( path ) [ ( - 1 ) ] . lower ( ) [ 1 : ] == extension ) ) ) #NEWLINE# return filter ( filt , dirname )