directory = '/Users/bla/asd'
folders = os.walk(directory)
folders_arr = folders.next()[1]
results = []
for folder_name in folders_arr:
    path = directory + '/' + folder_name
allfiles = glob.glob(path)
results.append(list(itertools.product(allfiles, allfiles)))
Декартов список файлов из отдельных папок