# Path: utils/config_file.py
# CONF_FILE  = 'config/hcbpy.conf'
# def touch(fname, times=None):
#     def __init__(self, key, val, comment):
# def get_all_data(filename=CONF_FILE):
# def get_field(field_name, filename=CONF_FILE):
# def init_field(key, val="none", filename=CONF_FILE):
# def has(field_name, filename=CONF_FILE):
# def get_lines(filename):
# def get_comment(field_name, filename=CONF_FILE):
# def set_field(field_name, value, filename=CONF_FILE):
# class ConfigEntry:


from utils import config_file



def select_acc(list, num):
    if num is not '-1' and str.isnumeric(num):
        val = int(num)
        if len(list) < val:
            print("This account is not exists")
            exit(1)

        acc = list[val]
        return acc
    else:
        for acc in list:
            print("[%d] %s %s" % (list.index(acc), acc.first_name, acc.last_name))

# Path: utils/config_file.py
# CONF_FILE  = 'config/hcbpy.conf'
# def touch(fname, times=None):
#     def __init__(self, key, val, comment):
# def get_all_data(filename=CONF_FILE):
# def get_field(field_name, filename=CONF_FILE):
# def init_field(key, val="none", filename=CONF_FILE):
# def has(field_name, filename=CONF_FILE):
# def get_lines(filename):
# def get_comment(field_name, filename=CONF_FILE):
# def set_field(field_name, value, filename=CONF_FILE):
# class ConfigEntry:


# Path: vk_auth/select_acc_menu.py
from utils import config_file




def select_acc(list, num):
    if num is not '-1' and str.isnumeric(num):
        val = int(num)
        if len(list) < val:
            print("This account is not exists")
            exit(1)

        acc = list[val]
        return acc
    else:
        for acc in list:
            print("[%d] %s %s" % (list.index(acc), acc.first_name, acc.last_name))

        cla = config_file.get_field("last acc")