
from __future__ import print_function, unicode_literals
from PyInquirer import prompt, print_json
import json

def fileSelection(files):
    selectfile = [
        {
            'type': 'list',
            'name': 'file',
            'message': 'Select the file you want to download :',
            'choices': files,
            # 'filter': f
        }
    ]

    file = prompt(selectfile)['file']
    print("")
    print(f'Downloading {file}')

    return file


from __future__ import print_function, unicode_literals
from PyInquirer import prompt, print_json
import json

def fileSelection(files):
    selectfile = [
        {
            'type': 'list',
            'name': 'file',
            'message': 'Select the file you want to download :',
            'choices': files,
            # 'filter': f
        }
    ]

    file = prompt(selectfile)['file']
    print("")
    print(f'Downloading {file}')

    return file

# 'filter': f