(path, use_sort=True, with_folder_path=False)
return fnames
Get all filenames under certain path
Get all filenames under certain path
Get all filenames under certain path
def get_filenames(path, use_sort=True, with_folder_path=False):
    ''' Get all filenames under certain path '''
    fnames = [f for f in listdir(path) if isfile(join(path, f))]
    if use_sort:
        fnames.sort()
    if with_folder_path:
        fnames = [path + "/" + f for f in fnames]
    return fnames
def get_filenames ( path , use_sort = True , with_folder_path = False ) : fnames = [ f for f in listdir ( path ) if isfile ( join ( path , f ) ) ] if use_sort : fnames . sort ( ) if with_folder_path : fnames = [ path + "/" + f for f in fnames ] return fnames